iPad에서 이전보기로 돌아 가면 iPhone에서 완벽하게 작동하는 동안 응용 프로그램이 종료됩니다

스왑 닐 코트 왈

내비게이션 바를 표시하기 위해 여러 가지 방법을 시도했지만 작동하지 않습니다. 그래서 secondViewController에 뒤로 버튼을 넣었고 iPhone에서는 완벽하게 작동하지만 iPad에서는 앱을 종료합니다.

 - (IBAction)back:(id)sender {

        [self.view endEditing:YES];
        if ([[UIDevice currentDevice]userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {

            LuanchViewController* SVC = [[LuanchViewController alloc] initWithNibName:@"LuanchViewController_iPhone" bundle:nil];
            [self presentViewController:SVC animated:YES completion:nil];
        }
        if ([[UIDevice currentDevice]userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
            [self.view endEditing:YES];

            LuanchViewController* SVC = [[LuanchViewController alloc] initWithNibName:@"LuanchViewController_iPhone" bundle:nil];
            [self presentViewController:SVC animated:YES completion:nil];
        }

        [self dismissModalViewControllerAnimated:YES];
        }

오류 :-

2013-10-16 18:44:42.775 iOS-test-harness[7095:c07] -[ViewController back:]: unrecognized selector sent to instance 0xa2accb0
2013-10-16 18:44:50.193 iOS-test-harness[7095:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ViewController back:]: unrecognized selector sent to instance 0xa2accb0'
*** First throw call stack:
(0x2c18012 0x1e8ce7e 0x2ca34bd 0x2c07bbc 0x2c0794e 0x1ea0705 0xdd42c0 0xdd4258 0xe95021 0xe9557f 0xe946e8 0xe03cef 0xe03f02 0xde1d4a 0xdd3698 0x2e51df9 0x2e51ad0 0x2b8dbf5 0x2b8d962 0x2bbebb6 0x2bbdf44 0x2bbde1b 0x2e507e3 0x2e50668 0xdd0ffc 0x240d 0x2335)
libc++abi.dylib: terminate called throwing an exception
쿠날 발라 니

Class ViewController (대부분 LuanchViewController의 수퍼 클래스)가 있고 구현에없는 메서드를 다시 호출하는 것 같습니다.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

Related 관련 기사

뜨겁다태그

보관