草庐IT

filterButtonContainer

全部标签

ios - 我的 UIView 有一个 UIButton 作为它的 subview 之一,但没有响应 objective-c 中的事件

这是我的代码。在尝试解决此问题一两个小时后,它开始看起来很拥挤。我试过将启用用户交互设置为是,我试过只使用一个按钮而不是将其设为另一个View的subview。现在我有filterBar>filterBarContainer>filterButton。-(void)viewDidAppear:(BOOL)animated{[superviewDidAppear:animated];self.navigationController.navigationBar.userInteractionEnabled=YES;self.view.userInteractionEnabled=YES;