当我取消添加到弹出窗口中的联系人时 UItextView 崩溃
UItextView crashes when I cancel add to contacts in popover
我已将 phone 个数字突出显示添加到我的 UITextView。
self.textView.dataDetectorTypes = UIDataDetectorTypeAll;
如果我只是:
- Selectphone个数
- 按添加到联系人
- 创建新联系人
- 完成
一切都很好。但是,如果我取消添加并尝试从此菜单退出,应用程序将崩溃。
- Selectphone个数
- 按添加到联系人
- 按下弹出框外(自动返回)
- 再次按下外部弹出窗口(崩溃)
所以...如果我取消在标准控件中添加联系人,应用程序会崩溃。它在私有方法中崩溃 (-[UITextView _finishHandlingInteraction:] UITextView_LinkInteraction.m:335).
我试图找到一些关于这些方法的信息,或者一些关于相同崩溃的信息。但它没有帮助=(
iOS 8.4
崩溃日志:
Assertion failure in -[MYCustomTextView _finishHandlingInteraction:], /SourceCache/UIKit/UIKit-3347.44/UITextView_LinkInteraction.m:335
* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: ''
* First throw call stack:
(0x2ad85fef 0x39171c8b 0x2ad85ec5 0x2ba84f17 0x2eab9a4b 0x2e76f2b7 0x2e76f793 0x2e76f735 0x2e76f52d 0x2eac4115 0x2e55806b 0x2e4070f9 0x2e820f9b 0x2e3d0181 0x2e3ce05f 0x2e4054d9 0x2e404ddd 0x2e3dafe5 0x198f2f 0x2e6518fb 0x2e3d99f9 0x2ad4bfaf 0x2ad4b3bf 0x2ad49a25 0x2ac96201 0x2ac96013 0x32472201 0x2e43aa59 0x1afa6b 0x396fdaaf)
libc++abi.dylib: terminating with uncaught exception of type NSException
对于iOS 9(13A4293g)斗鱼:
*** Assertion failure in -[MYCustomTextView _finishHandlingInteraction:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3486.4/UITextView_LinkInteraction.m:342
* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: ''
* First throw call stack:
(0x24d69153 0x3659ee0f 0x24d69029 0x25b4862d 0x297c1867 0x297c2397 0x29362041 0x2936267b 0x293625e3 0x29362315 0x297cf597 0x29408299 0x29454123 0x290dff13 0x28f77189 0x294538f3 0x28f39ecb 0x28f37ab1 0x28f75201 0x28f7494b 0x28f469b5 0x1679e3 0x28f4533d 0x24d2c81b 0x24d2c409 0x24d2a74b 0x24c7d229 0x24c7d015 0x2dd25bb9 0x28faca7d 0x17e523 0x36d07873)
libc++abi.dylib: terminating with uncaught exception of type NSException
- 测试:
- iOS7.1(iPad模拟器)_不要崩溃
- iOS8.4(iPad模拟器)_崩溃
- iOS 8.3 (iPad 4) _ 崩溃
- iOS8.3(iPad迷你)_崩溃
- iOS 8.4(iPad 迷你 3)_崩溃
- iOS斗鱼9号(iPad迷你)_崩溃
添加到联系人 调用的视图似乎仍在编辑中,如果您在此期间结束该视图,它将崩溃。您应该尝试强制结束 Create New Contact 视图,以便存储文本。也许尝试这样的事情:
- (void) viewWillDisappear: (BOOL) animated {
[super viewWillDisappear: animated];
[self.view.window endEditing: YES]; //force the view to end here
}
这是 iOS 核心的问题。我已经写信给苹果支持。他们建议我在 iOS 9 beta 4 上测试它。现在它不会崩溃。但是 post 日志中有很多奇怪的消息。无论如何,现在这不是讨论的主题。这是为苹果公司的人工作的。这就是为什么。
我已将 phone 个数字突出显示添加到我的 UITextView。
self.textView.dataDetectorTypes = UIDataDetectorTypeAll;
如果我只是:
- Selectphone个数
- 按添加到联系人
- 创建新联系人
- 完成
一切都很好。但是,如果我取消添加并尝试从此菜单退出,应用程序将崩溃。
- Selectphone个数
- 按添加到联系人
- 按下弹出框外(自动返回)
- 再次按下外部弹出窗口(崩溃)
所以...如果我取消在标准控件中添加联系人,应用程序会崩溃。它在私有方法中崩溃 (-[UITextView _finishHandlingInteraction:] UITextView_LinkInteraction.m:335).
我试图找到一些关于这些方法的信息,或者一些关于相同崩溃的信息。但它没有帮助=(
iOS 8.4
崩溃日志:
Assertion failure in -[MYCustomTextView _finishHandlingInteraction:], /SourceCache/UIKit/UIKit-3347.44/UITextView_LinkInteraction.m:335
* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '' * First throw call stack: (0x2ad85fef 0x39171c8b 0x2ad85ec5 0x2ba84f17 0x2eab9a4b 0x2e76f2b7 0x2e76f793 0x2e76f735 0x2e76f52d 0x2eac4115 0x2e55806b 0x2e4070f9 0x2e820f9b 0x2e3d0181 0x2e3ce05f 0x2e4054d9 0x2e404ddd 0x2e3dafe5 0x198f2f 0x2e6518fb 0x2e3d99f9 0x2ad4bfaf 0x2ad4b3bf 0x2ad49a25 0x2ac96201 0x2ac96013 0x32472201 0x2e43aa59 0x1afa6b 0x396fdaaf) libc++abi.dylib: terminating with uncaught exception of type NSException
对于iOS 9(13A4293g)斗鱼:
*** Assertion failure in -[MYCustomTextView _finishHandlingInteraction:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3486.4/UITextView_LinkInteraction.m:342
* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '' * First throw call stack: (0x24d69153 0x3659ee0f 0x24d69029 0x25b4862d 0x297c1867 0x297c2397 0x29362041 0x2936267b 0x293625e3 0x29362315 0x297cf597 0x29408299 0x29454123 0x290dff13 0x28f77189 0x294538f3 0x28f39ecb 0x28f37ab1 0x28f75201 0x28f7494b 0x28f469b5 0x1679e3 0x28f4533d 0x24d2c81b 0x24d2c409 0x24d2a74b 0x24c7d229 0x24c7d015 0x2dd25bb9 0x28faca7d 0x17e523 0x36d07873) libc++abi.dylib: terminating with uncaught exception of type NSException
- 测试:
- iOS7.1(iPad模拟器)_不要崩溃
- iOS8.4(iPad模拟器)_崩溃
- iOS 8.3 (iPad 4) _ 崩溃
- iOS8.3(iPad迷你)_崩溃
- iOS 8.4(iPad 迷你 3)_崩溃
- iOS斗鱼9号(iPad迷你)_崩溃
添加到联系人 调用的视图似乎仍在编辑中,如果您在此期间结束该视图,它将崩溃。您应该尝试强制结束 Create New Contact 视图,以便存储文本。也许尝试这样的事情:
- (void) viewWillDisappear: (BOOL) animated {
[super viewWillDisappear: animated];
[self.view.window endEditing: YES]; //force the view to end here
}
这是 iOS 核心的问题。我已经写信给苹果支持。他们建议我在 iOS 9 beta 4 上测试它。现在它不会崩溃。但是 post 日志中有很多奇怪的消息。无论如何,现在这不是讨论的主题。这是为苹果公司的人工作的。这就是为什么。