
我在用
textVIEw.layer.shadowOpacity=0.8;textVIEw.layer.shadowcolor=[[UIcolor lightGraycolor] CGcolor];textVIEw.layer.shadowOffset=CGSizeMake(0,0);textVIEw.layer.shadowRadius=3;textVIEw.layer.cornerRadius=3;
但如果UITextVIEw背景是透明的,它会给UITextVIEw的文本带来阴影.
所以有任何想法如何给像这样的UITextVIEw层提供阴影 – >
// Add shadow [textVIEw.layer setBackgroundcolor: [[UIcolor whitecolor] CGcolor]]; [textVIEw.layer setbordercolor: [[UIcolor graycolor] CGcolor]]; [textVIEw.layer setborderWIDth: 1.0]; [textVIEw.layer setCornerRadius:12.0f]; [textVIEw.layer setMasksToBounds:NO]; textVIEw.layer.shouldRasterize = YES; [textVIEw.layer setShadowRadius:2.0f]; textVIEw.layer.shadowcolor = [[UIcolor blackcolor] CGcolor]; textVIEw.layer.shadowOffset = CGSizeMake(1.0f,1.0f); textVIEw.layer.shadowOpacity = 1.0f; textVIEw.layer.shadowRadius = 1.0f;总结
以上是内存溢出为你收集整理的iPhone – 将阴影应用于UITextView.layer?全部内容,希望文章能够帮你解决iPhone – 将阴影应用于UITextView.layer?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)