Change the font size of UIPickerView from UIWebView

264 views Asked by At

I am writing an iOS app using Xcode, and face a problem.

There is an UIWebView to load a webpage. On this webpage, there are some select elements. When user click the select, a data picker will automatically display for user to pick data. However, some long strings in the picker will be cut(e.g. a string "state_city_area_block" may display like "state_city_ar..."). So I think I have to make the font size of the picker smaller.

However, now I can just get the instance of the UIPickerView, but I don't know how to change its font size as it is generated by the UIWebView and I can not set the delegate functions for this picker.

Is it possible for me to change the font size of this UIPickerView from UIWebView?


I have tried to traverse all the UILabels in subviews of the picker, and change their font. It works when the picker appears, but when I scroll the picker, the font recovers...

0

There are 0 answers