[ios note]实现UITextView的圆角

屏幕快照 2011-01-06 下午06.46.31

UITextView用于显示和输入大段文字,没有设置圆角的属性,跟UITextField不一致,在既有UITextField又有UITextView的界面中显得很突兀。

实现UITextView圆角的方法是借助UITextView的layer.原码如下:

foobar.h

#import <QuartzCore/QuartzCore.h>

foobar.m

note.layer.cornerRadius = 6;

note.layer.masksToBounds = YES;


效果:

屏幕快照 2011-01-06 下午06.45.57

 

相关文章:

右舷

↑ Grab this Headline Animator

Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.

Comments

No comments yet.

Leave a comment

(required)

(required)