我正在使用xCode7而我正在尝试不使用故事板。我已经从info.plist中删除了启动屏幕和主要故事板属性,并且我创建了一个正确链接到视图控制器的xib文件。在我的app委托中,我编写了以下代码:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
CGRect screenBounds = [[UIScreen mainScreen] bounds];
UIWindow *window = [[UIWindow alloc] initWithFrame:screenBounds];
ViewController *vc = [[ViewController alloc] init];
[window setRootViewController:vc];
[window makeKeyAndVisible];
[self setWindow:window];
return YES;
}
我的xib文件在编辑器中如下所示:
这些按钮用于显示顶部和底部。
在模拟器中它看起来像这样:
任何人都可以对此事提出一些看法吗?谢谢,P。
答案 0 :(得分:0)
看起来您应该查看Top Bar
和Bottom Bar
。确保没有。我希望这可以帮到你。
[viewController.navigationController setNavigationBarHidden:YES animated:YES];
和
[viewController.navigationController setToolbarHidden:YES animated:YES];
我没有在xcode上测试它,也许我的代码中有一些错误。 我希望这可以帮到你。