gpt4 book ai didi

iphone - 使用UITabBarController的iPhone应用程序崩溃

转载 作者:行者123 更新时间:2023-12-03 17:39:58 25 4
gpt4 key购买 nike

您能帮助您了解该崩溃日志吗?我不确定是什么问题。

"0   MyApp                               0x0007af6f MyApp + 499567",
"1 MyApp 0x0007b6d1 MyAPp + 501457",
"2 libsystem_c.dylib 0x33bb97e3 _sigtramp + 38",
"3 JavaScriptCore 0x35668fef WTFReportBacktrace + 146",
"4 WebCore 0x32b5740f WebThreadLock + 54",
"5 UIKit 0x310ec4bf -[UIFieldEditor scrollXOffset] + 10",
"6 UIKit 0x310ec463 -[UITextField _endedEditing] + 166",
"7 UIKit 0x310ec375 -[UITextField willDetachFieldEditor:] + 44",
"8 UIKit 0x310b616d -[UIFieldEditor becomeFieldEditorForView:] + 168",
"9 UIKit 0x310ec0bd -[UITextField _resignFirstResponder] + 188",
"10 UIKit 0x30fd1695 -[UIResponder resignFirstResponder] + 128",
"11 UIKit 0x30ff6c7b -[UITextField resignFirstResponder] + 150",
"12 UIKit 0x310b000f -[UIView(Hierarchy) _removeFirstResponderFromSubtree] + 146",
"13 UIKit 0x3118fe4b __UIViewWillBeRemovedFromSuperview + 54",
"14 UIKit 0x30fd0cbd -[UIView(Hierarchy) removeFromSuperview] + 56",
"15 UIKit 0x31069873 -[UITransitionView _didCompleteTransition:] + 422",
"16 UIKit 0x310691a3 -[UITransitionView transition:fromView:toView:] + 1402",
"17 UIKit 0x31068c21 -[UITransitionView transition:toView:] + 104",
"18 UIKit 0x310687ed -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 524",
"19 UIKit 0x310685db -[UITabBarController transitionFromViewController:toViewController:] + 30",
"20 UIKit 0x31067f15 -[UITabBarController _setSelectedViewController:] + 300",
"21 UIKit 0x31067c49 -[UITabBarController setSelectedIndex:] + 240",
"22 MyApp 0x00002f6d MyApp + 8045",
"23 MyApp 0x000789ef MyApp + 489967",
"24 MyApp 0x0007644f MyApp + 480335",
"25 Foundation 0x37ae1a81 -[NSThread main] + 72",
"26 Foundation 0x37b75591 __NSThread__main__ + 1048",
"27 libsystem_c.dylib 0x33b70735 _pthread_start + 320",
"28 libsystem_c.dylib 0x33b705f0 thread_start + 8"

第22行:这是该函数:
- (UIViewController *) selectTabBarItemWithTag:(NSInteger) tag
{
NSArray *viewControllers = self.rootController.viewControllers;

int idx = 0;
for (UIViewController *vc in viewControllers) {
if (vc.tabBarItem.tag == tag) {
self.rootController.selectedIndex = idx;
return vc;
}

idx++;
}

return nil;
}

最佳答案

检查页面上存在的UITextField对象。因为在UIViewController上 Activity 的UITextField的resignFirstResponder方法上出现错误,所以。也许最好在UIViewController的方法调用resignFirstResponder中添加方法viewWillDisappear:,该方法将被更改。
实际上,您的问题与下一个非常接近:
UITextFieldDelegate problem

关于iphone - 使用UITabBarController的iPhone应用程序崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12490176/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com