아이폰어플개발정보2010. 10. 12. 06:01
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.navigationControllersetToolbarHidden:YESanimated:NO];

    

    [self.navigationControllerpushViewController:self.detailViewControlleranimated:YES];

}

Posted by 오늘마감

댓글을 달아 주세요