어떻게이 코드가 UIView에서 UINavigationBar를 생성하지 않습니까?프로그래밍 방식으로 UINavigationBar 만들기
//create the view
UIView *view = [[UIView alloc] init];
view.backgroundColor = [UIColor whiteColor];
//everything for tabbar
UINavigationBar *navBar = [[UINavigationBar alloc] init];
//add the components to the view
[view addSubview: navBar];
//show the view
self.view = view;
흰색보기가 표시되지만 NavBar는 표시되지 않습니다. 어떤 도움이 필요합니까? 내가 도대체 뭘 잘못하고있는 겁니까?
'view.frame = CGRectMake (x, y, w, h); navBar.frame = view.bounds; ' –