给TextView 加上圆角和边框
要引头:
#import <QuartzCore/QuartzCore.h>
代码如下:
[tvContent.layer setBackgroundColor:[[UIColor whiteColor] CGColor]]; [tvContent.layer setBorderColor:[[UIColor grayColor] CGColor]]; [tvContent.layer setBorderWidth:1.0]; [tvContent.layer setCornerRadius:8.0]; [tvContent.layer setMasksToBounds:YES]; [tvContent setClipsToBounds:YES];