objective c - OpenSans font not working in iOS simulator -


i'd use opensans font on uilabel, it's not showing in ios simulator. appears default system font. have:

1) added files project + selected copy app folder.

2) added info.plist.

info.plist

3) xcode automatically added fonts build phases folder.

4) cleaned project + built again.

and still doesn't show up! in code, have this:

self.itemprice = [[uilabel alloc] initwithframe:cgrectmake(230.0, 30.0, 75.0, 30.0)];         self.itemprice.adjustsfontsizetofitwidth = yes;         self.itemprice.font = [uifont fontwithname:@"opensans-extrabold" size:13.0f];         self.itemprice.textalignment = nstextalignmentcenter;         self.itemprice.text = [nsstring stringwithformat:@"%@", [formatters formatprice:self.item.price]];         [self.slidingdetailscrollview addsubview:self.itemprice]; 

anyone know causing bizarre bug?

fixed it, because of minor error.

self.itemprice.font = [uifont fontwithname:@"opensans-extrabold" size:13.0f]; 

extrabold, not extrabold. opened font viewer, recommended, , showed under postscript name.

i have used #define's place font string name in there , use throughout application avoid user error , literal strings in middle of code.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -