如何删除centerViewController在IIViewDeckController 2.2.11上的阴影?我知道我必须使用一个委托来实现viewDeckController:applyShadow:withBound: selector。但我不知道该怎么做。
如果有人能帮我的话。谢谢
发布于 2014-10-07 14:26:37
所以我找到了2.2.11版本的解决方案。
我把这个添加到AppDelegate.h:
#import "IIViewDeckController.h"
@interface AppDelegate : UIResponder <UIApplicationDelegate, IIViewDeckControllerDelegate>在AppDelegate.m中,在didFinishLaunchingWithOptions类中:
deckController.delegate = self;然后,我在AppDelegate.m的末尾添加了viewDeckController:applyShadow:withBound: selector:
- (void)viewDeckController:(IIViewDeckController *)viewDeckController applyShadow:(CALayer *)shadowLayer withBounds:(CGRect)rect {
shadowLayer.masksToBounds = NO;
shadowLayer.shadowRadius = 0;
shadowLayer.shadowOpacity = 0;
shadowLayer.shadowColor = nil;
shadowLayer.shadowOffset = CGSizeZero;
shadowLayer.shadowPath = nil;
}发布于 2014-09-23 14:38:50
在'shadowEnabled‘实例变量中,IIViewDeckController中有一个名为,只需将其设置为,NO的属性。
或者,在Storyboard或.Xib文件中,您可以添加一个用户定义的运行时属性,其中键路径为'shadowEnabled‘,类型为“Boolean”,取消选中值(使其为NO/False)。
https://stackoverflow.com/questions/25977934
复制相似问题