简体   繁体   English

iOS7 Xcode 5升级使Longpress崩溃应用

[英]iOS7 Xcode 5 Upgrade makes longpress crash app

I have an app that I've been working on, which worked perfectly a few hours ago. 我有一个正在开发的应用程序,该应用程序在数小时前运行良好。 I downloaded DP5 of Xcode-5, upgraded my storyboards using the built in upgrade storyboard features. 我下载了Xcode-5的DP5,并使用内置的升级故事板功能升级了我的故事板。

When I launch the app it works. 当我启动该应用程序时,它可以工作。 It's a basic map app. 这是一个基本的地图应用程序。 I have an action for to register a longpress, and then drop a pin annotation on the map and now the app crashes without any error, except showing the line in the compiler code where it fails: 0x102d49c: calll 0x102d4a1 ; -[NSPathStore2 isEqualToString:] + 17 我有一个动作来注册一个longpress,然后在地图上放一个大头针注释,现在该应用程序崩溃了,没有任何错误,只不过在编译器代码中在失败的0x102d49c: calll 0x102d4a1 ; -[NSPathStore2 isEqualToString:] + 17行显示了该行: 0x102d49c: calll 0x102d4a1 ; -[NSPathStore2 isEqualToString:] + 17 0x102d49c: calll 0x102d4a1 ; -[NSPathStore2 isEqualToString:] + 17 and a cryptic message of EXC_BAD_ACCESS . 0x102d49c: calll 0x102d4a1 ; -[NSPathStore2 isEqualToString:] + 17和一条神秘消息EXC_BAD_ACCESS

I don't even know where to begin troubleshooting. 我什至不知道从哪里开始进行故障排除。 I'm downloading the release build of Xcode 5 right now to see if that fixes it. 我现在正在下载Xcode 5的发行版,以查看是否可以解决该问题。

--Update-- --Update--

I've also tried a clean build, restarting the simulator and Xcode. 我也尝试过一个干净的构建,重新启动模拟器和Xcode。

I used breakpoints and it seems that the app is having trouble specifically with adding the annotation to the map [self.mapView addAnnotation:annot]; 我使用了断点,似乎该应用程序在将注释添加到地图上时特别麻烦[self.mapView addAnnotation:annot];

Woot! 活泉! Solved the issue. 解决了问题。 Hope this helps someone. 希望这对某人有帮助。

I was using Apple's stock code for annotating maps . 我使用Apple的股票代码来注释地图

When I built the app for iOS6, by default, adding a pin annotation did NOT show the disclosure right away. 当我为iOS6构建应用程序时,默认情况下,添加图钉注释不会立即显示该公开内容。

So I added this line of code to select the annotation and display my annotation by default. 因此,我添加了以下代码行以选择注释并默认显示我的注释。 Removing this line fixed it, and in iOS7, the disclosure shows by default anyway! 删除此行即可解决此问题,并且在iOS7中,无论如何,默认情况下都会显示该信息! [mapView selectAnnotation:pinView.annotation animated:YES];

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

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