iphone - NSMutableParagraphStyle shifting text down slightly? -


i have uilabel uses nsattributedstring display "game over". have positioned text in ib , displays in correct place. problem want text centred onscreen when setup nsmutableparagraphstyle text shifts down few pixels.

enter image description here

nsmutableparagraphstyle *pstyle = [[nsmutableparagraphstyle alloc] init]; [pstyle setalignment:nstextalignmentcenter];  nsdictionary *dict = @{nsforegroundcolorattributename : displaycolor,                                   nsfontattributename : displayfont,                         nsparagraphstyleattributename : pstyle}; 

if leave out nsparagraphstyleattributename text positioned correctly, add in , centers correctly shifts down 5-6pixels. know causing this, there default not setting causing shift.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -