字符包装在IOS 7中不起作用

时间:2013-10-11 06:54:29

标签: text char ios7 uilabel

enter image description here我已经制作了应用程序IOS 6 Xcode 4.6但NSLineBreakByCharWrapping无法在IOS 7设备上运行。 任何帮助?

代码:

UILabel *lbltitle=[[UILabel alloc] init];
lbltitle.backgroundColor=[UIColor blackColor];
lbltitle.frame = CGRectMake(2.5,(12+(j*11.5)+(j*0.5)- intBarheight),btnDay.frame.size.width-4,11.5);
[self.view bringSubviewToFront:lbltitle];
lbltitle.font=[UIFont fontWithName:@"Lato-Regular" size:9];
[enter image description here][2]lbltitle.lineBreakMode = NSLineBreakByCharWrapping;
lbltitle.text=[Dtemp objectForKey:@"EventTitle"];
lbltitle.textAlignment=NSTextAlignmentLeft;
lbltitle.textColor=[UIColor whiteColor];
[btnDay addSubview:lbltitle];

见上图这里黑色是我的标签bacgground颜色,但我的最后一个字符被剪切。 这段代码适用于ios 6。

0 个答案:

没有答案