【问题标题】:UIButton not responding in presented UIViewController in iOS7. Responds in iOS8UIButton 在 iOS7 中呈现的 UIViewController 中没有响应。 iOS8 中的响应
【发布时间】:2014-12-03 07:57:16
【问题描述】:

我有一个视图控制器,我以弹出窗口的形式呈现。在 iOS7 中,右上角的两个按钮(关闭和批准)不响应触摸。 Touches 在 iOS8 上运行良好。 我在该视图中有更多按钮可以响应触摸,如果我将这些按钮从它们响应触摸的角落移动,则更多。 请帮忙:)

这是我展示模态视图的方式:

 [self.firstAvailableUIViewController.drawerController presentViewController:sdvc animated:YES completion:^{
}];

【问题讨论】:

  • 您能分享故事板中的代码和/或屏幕截图吗?

标签: objective-c ios7 uiviewcontroller uibutton ios8


【解决方案1】:

检查按钮的框架/边界和容器视图(视图控制器的主视图) - 在运行时,NSLog 它们。有时按钮是可见的,但实际上在容器边界之外,因此不响应触摸事件。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-05
    相关资源
    最近更新 更多