UIPickerView Width in iOS8 Swift -


i can not find out how width of component on uipickerview. it's not allowing simple (int) needs cgfloat. put in <#code#> section?

func pickerview(pickerview: uipickerview, widthforcomponent component: int) -> cgfloat {     <#code#> } 

thank you!

that method. doesn't "get width of component..." picker view calls method ask how wide component should be.

your method simple as:

func pickerview(pickerview: uipickerview, widthforcomponent component: int) -> cgfloat  {   return cgfloat(25.0) } 

(or whatever width appropriate picker view...)

you need cast result exptected type.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -