[英]How to SHOW bottombar (tab bar controller)?
我用它來隱藏底部的酒吧
-(BOOL) hidesBottomBarWhenPushed{
return YES;
}
現在,我要不要再隱藏它了。 我應該使用什么方法?
謝謝
看一下Elements示例項目。 它們執行所需的操作,尤其是在ElementViewController.m文件中。
那很簡單,只需使用以下命令:
[tabBar setHidesBottomBarWhenPushed:FALSE];
我花了一些時間來解決約翰的困惑。 這是我的最終結果。 在我的視圖控制器的.m文件中,添加以下代碼:
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
// Custom initialization
self.hidesBottomBarWhenPushed = YES;
}
return self;}
因為我使用筆尖文件,所以我不得不重寫initWithNibName方法。
一個非常簡單的方法:
Class *instanceName = [[Class alloc] init];
instanceName.hidesBottomBarWhenPushed = YES;
...
[navigationController pushViewController:instanceName animated:YES];
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.