2012-02-24 4 views
0

아이폰의 스토리 보드에 분할 뷰 프로젝트를 만듭니다. 바 버튼 항목을 탐색 오른쪽으로 드래그하고 스타일 추가를 변경하고 스토리 컨트롤러로 뷰 컨트롤러를 드래그합니다. 컨트롤을 드래그하여 링크를 만들고 uiviewcontroller의 사용자 정의 클래스 인 "AddViewController"를 변경합니다. 프로젝트를 실행하고 DetailViewController를 누르면 검정색보기가됩니다.스토리 보드 탐색 uviewcontroller에 대한 아이템 링크

그리고 난 내가 "AddCreateViewController"를 만들의 나, 내가 언급해야 할 기능에 이유 을 발견 AddViewController.m

-(void) viewDidAppear:(BOOL)animated 
{ 
    [super viewDidAppear:animated]; 
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone"  bundle:nil]; 
    UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"AddViewController"]; 
    [vc setModalPresentationStyle:UIModalPresentationCurrentContext]; 
    [self presentModalViewController:vc animated:YES]; 
} 

답변

0

에 코드 입력을 가지고있다.

- (void)loadView 
{ 
    // If you create your views manually, you MUST override this method and use it to create your views. 
    // If you use Interface Builder to create your views, then you must NOT override this method. 
}