xcode - Why sizeWithFont: and sizeWithAttributes: return different values? -


i have cclabelttf nsstring text. on 5th ios sizewithfont: returns height bigger sizewithattributes: on 7th.

if ([[[uidevice currentdevice] systemversion] compare:@"7.0" options:nsnumericsearch] == nsorderedascending) {      dim = [string sizewithfont:font]; } else {      dim = [string sizewithattributes:[nsdictionary dictionarywithobject:[uifont fontwithname:name size:(cgfloat)size] forkey:nsfontattributename]]; }  dim differs on 1 pixel 5 , 7 ios 


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -