gpt4 book ai didi

ios - 如何去除 UIPopoverController 中的 "fuzzy"阴影

转载 作者:可可西里 更新时间:2023-11-01 04:19:39 26 4
gpt4 key购买 nike

当 UIPopoverController 的 View 出现时,我不想要投影。有没有办法去除这种投影外观?

最佳答案

不是直接的,但是从 iOS 5 开始,您可以使用 UIPopoverBackgroundView 制作您自己的自定义弹出框背景。

查看此问题的答案:Using UIPopoverBackgroundView class .它指向一个好的 tuto。

然后,在 UIPopoverBackgroundView 实现的 initWithFrame 中,您可以使用 clearColor 作为投影。使用偏移量和半径对我不起作用。

- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {

self.layer.shadowColor = [[UIColor clearColor] CGColor];
}
return self;
}

关于ios - 如何去除 UIPopoverController 中的 "fuzzy"阴影,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5235236/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com