嗨,我是 IOS 开发和开发 IOS 应用程序的新手,我在其中使用拆分视图控制器。我的拆分视图控制器不在根位置。我先登录然后打开拆分视图控制器。所以我在用户登录成功后所做的我正在更改根视图控制器。这是我到目前为止所做的:
在登录按钮单击时,我将根视图控制器更改为像这样的拆分视图控制器
- (IBAction)signinAction:(id)sender
{
NSLog(@"inside sign in .... ");
AppDelegate *delegate = [[UIApplication sharedApplication] delegate];
delegate.window.rootViewController = [[UserProfileController alloc] init];
[self dismissViewControllerAnimated:YES completion:nil];
}
用户配置文件是我拆分视图的详细视图控制器。
@interface UserProfileController : UIViewController<UISplitViewControllerDelegate>
@end
但点击登录按钮后,它会打开黑色窗口。不知道怎么回事。难道我做错了什么?需要帮助谢谢。