在UIButton文本标签上放置文本阴影 [英] Putting text shadow on a UIButton text label

查看:130
本文介绍了在UIButton文本标签上放置文本阴影的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 UIButton ,我放置了一个文本标签。我想改变文本的颜色,并把一个阴影1像素远离文本,给它一个很好的3D种类的视图。

I have a UIButton on which I am putting a text label. I want to change the color of the text and also put a shadow 1 pixel away from the text, to give it a nice 3D kind of view. How would I do this?

推荐答案


我想更改文字的颜色...

I want to change the color of the text ...

- [UILabel setTextColor:]


...还有一些阴影...

... and also put some shadow ...

- [UILabel setShadowColor:]


... 1 pix文本

... 1 pix away from the text

- [UILabel setShadowOffset:]

这篇关于在UIButton文本标签上放置文本阴影的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆