How to Delete uilabelview text appends three dots to the end in iphone
I have a UILabel which has UILabel attached to it. I add NSString value to it and each time for each cell after the text is over, it appends three dots to the end of the text file. I am not sure why would I get that. Does any body have faced the similar problems: Here I define my UILabel:
UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 15, 15)];
// set the label
label1.backgroundColor = [UIColor clearColor];
label1.font = [UIFont boldSystemFontOfSize:14];
label1.adjustsFontSizeToFitWidth = NO;
self.labelView1 = label1;
[self.contentView addSubview:label1];
[label1 release]开发者_StackOverflow;
And I add the text as following.
labelView1.text = title;
labelView1.adjustsFontSizeToFitWidth = NO;
If you don't want the label to append '...' when string does not fit label's size set label's lineBreakMode
property to UILineBreakModeClip:
label1.lineBreakMode = UILineBreakModeClip;
The problem is that the text is too long to fit the label and you've called
label1.adjustsFontSizeToFitWidth = NO;
which means the text will not be scaled down to fit.
With a width of 15
, you can barely fit one letter of font size 14
. Make the label bigger or size to fit (or both).
精彩评论