“Hide” the Tab Bar When Pushing a View

后端 未结 3 770
暗喜
暗喜 2021-01-13 02:20

The New York Times iPhone application has a Tab Bar with five tab bar items. When you select the Latest tab, the app shows the title and abstract/summary in a UITableView.

3条回答
  •  南方客
    南方客 (楼主)
    2021-01-13 02:48

    Implement this piece of code in the class where you want to hide the Tab Bar.

    - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
        // Custom initialization
    }
    self.hidesBottomBarWhenPushed = YES;
    return self;
    }
    

    All the best.

提交回复
热议问题