0

このコードが UIView で 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 は表示されません。何か助けはありますか?私は何を間違っていますか?

4

1 に答える 1