简体   繁体   English

IOS应用程序在安装时不响应IOS Simulator上的触摸事件

[英]IOS app does not respond to touch events on IOS Simulator on install

When I install and run my app on IOS Simulator 9.1 after resetting content and settings the app does not respond to touch events. 当我在重置内容和设置后在IOS Simulator 9.1上安装并运行我的应用程序时,应用程序不响应触摸事件。

All of the code that runs from application:(UIApplication *)application didFinishLaunchingWithOptions and the code in the initial view's viewDidLoad and viewWillAppear runs correctly without error. application:(UIApplication *)application didFinishLaunchingWithOptions运行的所有代码都是application:(UIApplication *)application didFinishLaunchingWithOptions ,初始视图中的代码viewDidLoad和viewWillAppear正确运行而没有错误。 There are also no error messages in XCode's console tab. XCode的控制台选项卡中也没有错误消息。

If I pause the application in XCode I see that the thread's stack trace looks exactly as it does when the app is working. 如果我在XCode中暂停应用程序,我会看到线程的堆栈跟踪看起来与应用程序工作时完全一样。

This is the backtrace: 这是回溯:

* thread #1: tid = 0xbff0bc, 0x0369a84a libsystem_kernel.dylib`mach_msg_trap + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x0369a84a libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x03699c34 libsystem_kernel.dylib`mach_msg + 68
  * frame #2: 0x01641bd6 CoreFoundation`__CFRunLoopServiceMachPort + 214
    frame #3: 0x01640fb6 CoreFoundation`__CFRunLoopRun + 1526
    frame #4: 0x01640706 CoreFoundation`CFRunLoopRunSpecific + 470
    frame #5: 0x0164051b CoreFoundation`CFRunLoopRunInMode + 123
    frame #6: 0x03f6d664 GraphicsServices`GSEventRunModal + 192
    frame #7: 0x03f6d4a1 GraphicsServices`GSEventRun + 104
    frame #8: 0x01d811eb UIKit`UIApplicationMain + 160
    frame #9: 0x0015970a MyApp`main(argc=1, argv=0xbff5384c) + 138 at main.m:6
    frame #10: 0x03371a21 libdyld.dylib`start + 1

Stopping and restarting the app doesn't fix the problem. 停止并重新启动应用程序无法解决问题。

Sometimes recompiling the app with only a whitespace change fixes the problem and the app responds to touch events. 有时仅使用空格更改重新编译应用程序可修复问题,应用程序会响应触摸事件。

If that doesn't work then restarting the IOS simulator fixes the problem 如果这不起作用,那么重新启动IOS模拟器可以解决问题

Please suggest any ways that I could potentially figure out what's going wrong. 请建议我可以找出出错的方法。

Thank you! 谢谢!

这是模拟器中的一个错误,我不时面对它,我清理并删除存档文件夹并再次构建它可以工作,但这种情况很少发生。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM