- (void)viewDidLoad {
[super viewDidLoad];
[self showInfoPage];
[textview setEditable:NO];
[self selfAdaption];
}
- (void)selfAdaption{
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc]init] ;
NSDictionary *attributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:16], NSParagraphStyleAttributeName:paragraphStyle};
paragraphStyle.lineSpacing = 10;
textview.attributedText = [[NSAttributedString alloc]initWithString:textview.text attributes:attributes];
}
改變UITextView文字之間的間距
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.