谢谢
解决方法 实际上我有一些修改来回答(迪伦)的答案在appDelegate中,我们需要在splitevIEw控制器中添加图像,而不是窗口
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]];
这里self是AppDelegate的对象。
现在应用此线程的答案:iPhoneOS SDK – Remove Corner Rounding from views (iPad problem)回答(abs)
在上面的帖子的答案是编辑
-(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;}
**将imgVIEw.hIDden设为FALSE
声明imgVIEw到AppDelegate.h文件**
不要忘了说这个
-(voID)dIDRotateFromInterfaceOrIEntation: UIInterfaceOrIEntation)fromInterfaceOrIEntation{ [yourAppDelegate performSelector:@selector(fixRoundedSplitVIEwCorner) withObject:NulL afterDelay:0];}总结
以上是内存溢出为你收集整理的objective-c – UISplitViewController:删除分隔线全部内容,希望文章能够帮你解决objective-c – UISplitViewController:删除分隔线所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)