scenario: i'm setting text font , size uitextfield. have placeholders. the code bellow in uiviewcontroller:
let font = uifont(name: "flamasemicondensed-book", size: 18) let attributesdictionary = [nsforegroundcolorattributename: defaultsystemcolor.darkred] // textfileds without borders (and placeholders) usernametextfield.borderstyle = uitextborderstyle.none usernametextfield.font = font usernametextfield.textcolor = defaultsystemcolor.darkred usernametextfield.attributedplaceholder = nsattributedstring(string: "email", attributes: attributesdictionary)
i'm configuring (in appdelegate) global ui setting, formats of uilabels font size. the code bellow in globaluisettings class:
let font = uifont(name: "flamasemicondensed-book", size: 13)! var labelappearace = uilabel.appearance() labelappearace.font = font
what's weird in here:
when uitextfield selected , i'm typing format 1 set text field (the placeholder ok too).
but when leave field assumes behaviour of uilabel.
i know because if comment uilabel format textfield works properly.
does have idea why happens?
try changing let font
let labelfont
because 'font' global. might affecting.
Comments
Post a Comment