嗨朋友,我想在拆分视图中隐藏分隔线。分隔线意味着当应用程序运行横向模式时,2 个视图显示一个左侧和另一个右侧,所以在这两个视图分隔线之间显示我想隐藏这个分隔线我试试这个代码在 appdelegate 类中,但这不能正常工作
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
UIView *coverView = [[UIView alloc] initWithFrame:CGRectMake(320, 44, 1, 704)];
[coverView setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"1x704.png"]]];
[splitViewController.view addSubview:coverView];
[window addSubview:splitViewController.view];
[window makeKeyAndVisible];
return YES;
}