iPhone UILabel 属性
我正在尝试在 UILabel 上设置阴影。
我希望阴影的角度为 -90 度,距离为 1 像素,不透明度为 55%,大小为 0 像素。
以上如何实现?
I'm trying to set a shadow on my UILabel.
I'd like the shadow to be at a -90 degree angle, 1 px distance, 55% opacity and 0px size.
How above can this implemented ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
很确定 px 距离是由字体决定的,如果不是,我找不到方法来获取它。
Pretty sure px distance is determined by font, if it isn't i cant find a way to get to it.
您必须将 blackColor 替换为您想要的任何颜色。
我猜你不能模糊阴影,但你似乎不想那样。
You would have to replace the blackColor with whatever you want.
I guess that you cannot blur the shadow, but you seem not to want that anyway.