I have a label, if i add text to label it added one extra space at the beginning of the text, app supports only portrait orientation. tried following solutions but no use. attached images for reference.
I have created this label in xib with number of lines 2 with constrains leading, trailing, bottom space to container, height is not fixed,
and set text like
dealName.text = "Cup of Coffee with A asdf asd asdf adsf ads fad"
UILabel extra spaces before and after text ios
UIlabel shows extra space before text
UILabel with multiple lines
UILabel with single line
try this may be there is an any white space before character this will remove this..
NSString *trimmed = [yourstring stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
yourlable.text = trimmed;
OR
Also see if you set attribute paragraph spacing from here..
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.