UItextField within UISearchbar failing after iOS 7 upgrade

前端 未结 4 822
无人及你
无人及你 2020-12-18 16:11

I have a UITextField for the UISearchBar which this was working until iOS 7 upgrade and now it fails at this line: UITextField *textfield=(UITextField*)[[searchBar sub

4条回答
  •  天涯浪人
    2020-12-18 17:04

    try this , it's work in Both IOS6 and IOS7+ and safe approch

    [[UITextField appearanceWhenContainedIn:[UISearchBar class], nil] setFont:[UIFont fontWithName:@"ArialMT" size:10]];
    

提交回复
热议问题