0

そのクラッシュログを理解するのを手伝ってもらえますか? 何が悪いのかわかりません。

"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;
}
4

2 に答える 2

0

ページに存在する UITextField オブジェクトを確認してください。resignFirstResponderUIViewController でアクティブになっている for UITextFieldのメソッドにエラーが表示されるためです。変更される UIViewController のresignFirstResponderメソッド呼び出し内にメソッドを追加する方が良いかもしれません。viewWillDisappear:実際、あなたの問題は次のことに非常に近いです: UITextFieldDelegate 問題

于 2012-09-19T07:44:09.060 に答える