Jor*_*n H 11 popover uipopovercontroller ios ios9
在iOS 8中,弹出窗口没有阴影.现在在iOS 9中,有一个非常沉重且影响深远的阴影,在纯白色背景上看起来不太理想.如何去除阴影,而是在弹出窗口周围添加一条细细的灰色线条?或者至少减少或减轻.
这在显示操作表,使用该视图控制器.Popover UIModalPresentationStyle以及可能在其他上下文中呈现视图控制器时发生.
行动表:
UIActionSheet(title: "Title", delegate: nil, cancelButtonTitle: "Cancel", destructiveButtonTitle: "Destroy").showInView(sender as! UIView)
Run Code Online (Sandbox Code Playgroud)
您可以使用自定义弹出窗口背景 UIPopoverBackgroundView
在initWithFrame您的UIPopoverBackgroundView实现中,您可以使用a [UIColor clearColor作为投影.
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
self.layer.shadowColor = [[UIColor clearColor] CGColor];
}
return self;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4598 次 |
| 最近记录: |