HTML5   发布时间:2022-04-27  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了objective-c – UISplitViewController:删除分隔线大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
在iPad上使用UISplitViewController时,根和细节视图之间有一条黑色的垂直分隔线。有没有办法删除这一行?

谢谢

解决方法

实际上我有一些修改来回答(迪伦)的答案

在appDelegate中,我们需要在spliteview控制器中添加图像,而不是窗口

@H_674_16@self.splitViewController.view.opaque = NO; imgView = [[UIImageView alloc] initWithImage: [UIImage imagenamed:@"FullNavBar.png"]]; [imgView setFrame:CGRectMake(0,1024,44)]; [[self.splitViewController view] insertSubview:imgView aTindex:0]; [[self.splitViewController view] setBACkgroundColor:[UIColor clearColor]];@H_262_17@

这里self是AppDelegate的对象。

现在应用此线程的答案:iPhoneOS SDK – Remove Corner Rounding from views (iPad problem)回答(abs)

在上面的帖子的答案是编辑

@H_674_16@-(void) fixRoundedSplitViewCorner { [self explode:[[UIApplication sharedApplication] keyWindow] level:0]; } -(void) explode:(id)aView level:(int)level { if ([aView isKindOfClass:[UIImageView class]]) { UIImageView* roundedCornerImage = (UIImageView*)aView; roundedCornerImage.hidden = YES; } if (level < 2) { for (UIView *subview in [aView subviews]) { [self explode:subview level:(level + 1)]; } } imgView.hidden = falSE; }@H_262_17@

**将imgView.hidden设为falSE
声明imgView到AppDelegate.h文件**

不要忘了说这个

@H_674_16@-(void)didRotateFromInterfaceOrientation: UIInterfaceOrientation)fromInterfaceOrientation { [yourAppDelegate perform@R_772_10288@ctor:@@R_772_10288@ctor(fixRoundedSplitViewCorner) withObject:NULL afterDelay:0]; }@H_262_17@

大佬总结

以上是大佬教程为你收集整理的objective-c – UISplitViewController:删除分隔线全部内容,希望文章能够帮你解决objective-c – UISplitViewController:删除分隔线所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。