IOS开发:关于UILabel阴影设置的问题
来源:互联网 发布:matlab 矩阵符号运算 编辑:程序博客网 时间:2024/04/29 16:44
今天用了一下UILable的setShadowoffset方法,想通过此方法设置一下阴影,但是却发现没效果,代码如下:
UILabel *lab = [[UILabelalloc]initWithFrame:CGRectMake(350,450, 100, 30)];
lab.text = @"我的博客";
[labsetShadowOffset:CGSizeMake(5.8,5.8)]
结果没有任何效果,我就尝试设置了一下shadowColor属性,发现有效果了,于是查了一下官方文档,原来此属性默认为nil,哎,真笨啊我。。。:
shadowColor
The shadow color of the text.
@property(nonatomic, retain) UIColor *shadowColor
Discussion
The default value for this property is nil
,which indicates that no shadow is drawn. In addition to this property, you may also want to change the default shadow offset by modifying the shadowOffset
property. Text shadows are drawn with the specified offset and color and no blurring.
- IOS开发:关于UILabel阴影设置的问题
- iOS开发--UILabel的相关属性设置
- iOS 开发--设置View的边框阴影
- ios开发UILabel换行的小问题
- 关于iOS UILabel 设置 UIEdgeInsets
- iOS开发时关于UILabel文本高度和宽度的计算问题(单行、多行)
- iOS开发笔记--UILabel的相关属性设置
- iOS开发笔记--UILabel的相关属性设置
- iOS开发笔记--UILabel的相关属性设置
- iOS开发笔记--UILabel的相关属性设置
- iOS开发笔记--UILabel的相关属性设置
- iOS开发笔记--UILabel的相关属性设置
- iOS开发笔记--UILabel的相关属性设置
- 关于阴影的问题
- 关于UILabel设置AttributedString以后末尾...不出现的问题
- iOS 设置UILabel的背景图片
- iOS开发:关于UILabel、UIButton、UITextField文字下划线的设置方法(涉及到富文本的知识)
- Q&A:关于iOS中UILabel显示汉字的问题
- Spicy apples
- 日本IT发展跟不上时代,智能手机全球份额仅3.7%
- 一个看起来不错的ORACLE的博客知识库
- Struts配置异常at com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory
- 设计模式笔记——Iterator
- IOS开发:关于UILabel阴影设置的问题
- hdu:4360(spfa)求各种状态的最短路
- ORACLE中decode函数的用法
- poj 1604 Just the Facts
- FZU:Problem 1864 Christmas Machine
- Linux 下模拟Ping命令的 C 实现
- js获取当前月的第一天和最后一天
- AutoBuild系统的改进
- 绘制实心圆