XCODE2010. 11. 6. 17:27
[아이폰 앱 개발] UIBarButtonItem을 viewDidLoad에서 만들고 숨기기

-(void)viewDidLoad{

UIBarButtonItem *temporaryBarButtonItem = [[UIBarButtonItem alloc] init];

temporaryBarButtonItem.title = @"Back";

self.navigationItem.backBarButtonItem = temporaryBarButtonItem;

[temporaryBarButtonItem release];

...

}

현재뷰에서 다음뷰갈때 위에서 만든 barButton숨기기



- (void)showDetails:(id)sender

{

    // the detail view does not want a toolbar so hide it

    [self.navigationController setToolbarHidden:YES animated:NO];

    

    [self.navigationController pushViewController:self.detailViewController animated:YES];

}

Posted by 오늘마감

댓글을 달아 주세요