UITextField changes font while editing

前端 未结 4 1579
滥情空心
滥情空心 2021-01-05 05:31

I am suffering the same problem as here UITextField's custom font changes while in edit mode and could really do with a solution.

I have 4 UITextFields that I as

4条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-05 05:59

    I have found that when I'm setting the UILabel appearance anywhere in the code:

    [[UILabel appearance] setFont:MYFONT];
    

    Changing UITextField font only applies to editing text, and not to the text shown in textfield when user is not editing it.

    Hope this helps

提交回复
热议问题