iOS - 删除 UITabBarViewController 阴影

标签 ios objective-c uiview uitabbarcontroller quartz-core

我有一个 UITabBarControllerPPRevealSideViewController 库连接,用于侧面菜单导航(所附图像从选项卡栏 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.layerself.view.layer.hidden = YES; 无济于事。

有什么建议可以实现这一点吗?

Transitioning from tab bar controller to right-side view controller with map.

最佳答案

阴影是由您使用的 PPRevealSideViewController 库创建的,而不是 UITabBarController。 来自 PPRevealSideViewController docs 的快速高峰,看起来您可以使用 PPRevealSideOptionsShowShadows 选项禁用阴影。

关于iOS - 删除 UITabBarViewController 阴影,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26329719/

相关文章:

ios - Push Segue 之后在导航栏上添加 UIView

ios - 显示带有选项的底部 View

ios - PNG 图像从未解除分配

ios - UIScrollView 框架随机更改

ios - 将新的核心数据对象插入到多对多的 NSOrderedSet 中会忽略索引

objective-c - 如何从 PDF 页面获取文本?

ios - 向 UITableViewCell 添加了自动布局,但我看到了未知现象

iphone - 使用 Objective c 获取 iPhone "Saved Photos"相册中的图像总数

架构 x86_64 的 IOS undefined symbol

ios - 将ScrollView添加到UIView中