导入QuartzCote框架: #import <QuartzCore/QuartzCore.h> 设置边框: textView.layer.borderColor = [UIColor grayColor].CGColor; textView.layer.borderWidth =1.0; textView.layer.cornerRadius =5.0;