如何將填充添加到以編程方式創建的UIlabel
文本中?添加填充以編程方式創建的UILabel
NSArray *collectionViewArrayTitle = _titleArray[collectionView.index];
NSString *title= collectionViewArrayTitle[indexPath.item];
newslabel =[[UILabel alloc] initWithFrame:CGRectMake(0, 80, 130, 50)];
_newslabel.textColor=[UIColor whiteColor];
_newslabel.backgroundColor=[UIColor blackColor] ;
_newslabel.alpha=1.0f;
_newslabel.text=title;
_newslabel.tag=collectionView.index;
_newslabel.lineBreakMode=NSLineBreakByTruncatingTail;
_newslabel.numberOfLines=4;