在uitextview周围添加自定义边框但很少超出其范围
我怎样才能在uitextview上添加边界,超出其范围。 我可以给边界的位置或我必须添加自定义边框并给它的位置。任何帮助将不胜感激。
这很容易。 你必须添加石英核心框架
并写下以下行
CALayer *imageLayer = textView.layer; [imageLayer setCornerRadius:10]; [imageLayer setBorderWidth:1]; imageLayer.borderColor=[[UIColor lightGrayColor] CGColor];
添加“QuartzCore”框架并将其导入HeaderFile
#import
在.h文件中
UITextView *TextView;
用于在TextView中设置边框
TextView.layer.borderWidth = 1.0f; TextView.layer.borderColor = [[UIColor grayColor] CGColor]; //[YounCan Use any Color For Border]
这有非常简单的集成和精彩的文本视图自定义: https : //github.com/99centsappdevelopment/JSTextView