【问题标题】:UIAlertViewController not responds after slow animation on in simulatorUIAlertViewController 在模拟器中慢动画后没有响应
【发布时间】:2016-04-27 05:47:34
【问题描述】:

我今天使用的是 xcode 7.2,我注意到模拟器中的行为非常奇怪。每当我在模拟器上打开UIAlertViewControllerActionSheetdefault 类型和Simulator slow-motion animations on⌘ + T)模式然后在应用程序没有响应一段时间后我无法在几秒钟内(大约20秒)进行用户活动)。这是什么问题我正在使用 Swift 作为参考,您可以使用以下代码为 UIAlertViewController 创建演示

@IBAction func alertShow(){
    let alertController = UIAlertController(title: "Title", message: "Message", preferredStyle: .Alert)
    alertController.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil))

    self.presentViewController(alertController, animated: true, completion: nil)
 }

【问题讨论】:

    标签: ios objective-c swift ios-simulator xcode7


    【解决方案1】:

    尝试在 viewdidload 中分配 UIAlertController,在你的 IBAction 函数中使用该对象,我可以正常工作

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-02
      • 1970-01-01
      • 1970-01-01
      • 2012-08-10
      • 1970-01-01
      • 2011-10-23
      相关资源
      最近更新 更多