How to remove shadow behind popovers on iOS 9?
Swift 4 version of accepted answer.
override init(frame: CGRect) {
super.init(frame: frame)
layer.shadowColor = UIColor.clear.cgColor
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
You can make your own custom popover background using UIPopoverBackgroundView
In the initWithFrame
of your UIPopoverBackgroundView
implementation, you can use a [UIColor clearColor
for the drop shadow.
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
self.layer.shadowColor = [[UIColor clearColor] CGColor];
}
return self;
}