我如何做到这一点:
If i press the "Einloggen" (Login) button
{
Show TabBarController with FirstViewController
}
(我是新手,我试图找出一些有关... https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/Introduction/Introduction.html Open another view when button is pressed in iOS)
我的脚本/功能如下。
- (IBAction)loginAction:(UIButton *)sender {
self.view = self.tabBarController.view;
}
然后我有一个黑屏。 如果我使用上面的stackoverflow问题中的代码,我会收到错误。
- (IBAction)loginAction:(UIButton *)sender {
UIViewController* tabViewController = [[UIViewController alloc] initWithNibName:@"tabViewController" bundle:[NSBundle mainBundle]];
[self.view addSubview:tabViewController.view];
}
提前谢谢!