Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reducing the space between components of UIPickerView

I want to reduce the space between the different components in a UIPickerView. Actually i want to build a picker view similar to the Timer in Watch app in iPhone.

i believe there are 4 components. First the hours component (0,1,2....23), the second one was hour component, third one was minutes (0,1,2....59) and fourth is min component. How i can increase the comparative space between Hour and Minute Components. I don't want to use hour and min word with every hour value and every min value.

like image 972
Abdul Samad Avatar asked Jan 30 '15 08:01

Abdul Samad


1 Answers

you would have to use the widthForComponent delegate method. the following is an example for Swift. just find the objective-c equivalent.

func pickerView(pickerView: UIPickerView, widthForComponent component: Int) -> CGFloat {
    return 30.0
}
like image 62
technoY2K Avatar answered Oct 15 '22 13:10

technoY2K