我有一个 UITabBarController
与 PPRevealSideViewController
库连接,用于侧面菜单导航(所附图像从选项卡栏 View 过渡到右侧 View Controller ,其中包含一个 MKMapView
)。
我想删除在 UITabBarController
的 View 中看到的投影。我尝试将以下内容放在 SLTabBarController.m
文件的 ViewDidLoad
中,它实现了我的 UITabBarController
:
self.view.layer.shadowColor = [UIColor redColor].CGColor;
self.view.layer.shadowOpacity = 0.0;
self.view.layer.shadowRadius = 0.0;
self.view.layer.shadowOffset = CGSizeMake(0, 3);
self.view.clipsToBounds = NO;
我也尝试过使用 self.view.tabBarController.layer
和 self.view.layer.hidden = YES;
无济于事。
有什么建议可以实现这一点吗?
最佳答案
阴影是由您使用的 PPRevealSideViewController 库创建的,而不是 UITabBarController。
来自 PPRevealSideViewController docs 的快速高峰,看起来您可以使用 PPRevealSideOptionsShowShadows
选项禁用阴影。
关于iOS - 删除 UITabBarViewController 阴影,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26329719/