2012-10-04 2 views
0

메신저 응용 프로그램을 디자인하는 단일보기 응용 프로그램 및 단추를 통해보기를 전환 할 수 있도록 코드를 추가 할 때마다 있지만 IOS 5에서 지금 일하고 내 코드를 입력 할 때마다 오류가 발생합니까? 를 heres 코드IOS 6 업데이트 코드 오류보기 전환

#import <UIKit/UIKit.h> 


@interface ViewController1 : UIViewController 


- (IBAction)home:(id)sender; 


@end 




#import "ViewController1.h" 

#import "ViewController.h" 

@interface ViewController1() 

@end 

@implementation ViewController1 


- (IBAction)home:(id)sender 
{ 
    ViewController *second =[[ViewController alloc] initWithNibName:nil bundle:nil]; 
    [self presentModalViewController:second animated:YES]; 
} 

을 heres 오류

enter image description here

당신을 감사합니다! edited edited my errors now ?? 그런데 내가 정말 감사하고 내가 대답하여 좋은 틱을 줄 것이다 의한

enter image description here

enter image description here

enter image description here 번이 이제 오류입니다 수행?

enter image description here 모든 enter image description here

+0

을 사용하여 제거하는 ??? – Picm

답변

2

첫째, 이것은 오류가 아닙니다하지만 경고한다.

그리고 도움을 받으려면 Apple에서 제공 한 문서를 읽어보십시오.

그리고 그 경고가 그냥 도와주세요 아래 코드

[self presentViewController:second animated:YES completion:^{ }]; 
+0

오류가 더 많으므로 올바른지 확인하십시오. – Picm

+0

xcode 4.5로 프로젝트에 지치고 잘 작동합니다. –

+0

Btw 표시되는 오류는 무엇입니까? 설명해주십시오. –