I found a strange behaviour when dealing with UIButton with big font size :
My iPad application need to present those kind of UIButton and I found that when I apply italic property on those big font sized UIButton, the text looks truncated like below :
this is strange as my UIButton is correctly centered and big enough. sizeToFit doesn't help. I tried to put log to know more, and it appears that the inside size of the UILabel of the button is too tiny :
NSLog(@"Button width : %.1f, text width : %.1f", button.frame.size.width, button.titleLabel.frame.size.width);
[button.titleLabel sizeToFit];
NSLog(@"Button width : %.1f, text width : %.1f", button.frame.size.width, button.titleLabel.frame.size.width);
which gives me :
Button width : 710.3, text width : 518.0
Button width : 710.3, text width : 518.0
it is doing the same think directly in IB, when applying more than 150 px font size on an italic styled UIButton. is there a way to fix it or is it an SDK bug ?