ios - Crash in ios7 while setting font on navigation bar -


i using link here change font , color of title in navigation bar. tried this. both of them run fine in ios8 when test in ios7 each time crashes @ "nsfontattributename". if remove code set font , set color , works.

the crash message * terminating app due uncaught exception 'nsinvalidargumentexception', reason: '*** -[__nsplaceholderdictionary initwithobjects:forkeys:count:]: attempt insert nil object objects[1]

any appreciated. hope problem clear.

use code:

uinavigationbar *navbar = [uinavigationbar appearance]; [navbar settitletextattributes:@{nsfontattributename: [uifont fontwithname:@"yourfont" size:15]]; 

Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -