views:

173

answers:

2

I have a view with a UIPickerView. The data for the UIPcikerView is runtime-driven. The data size for the UIPickerView varies from 2 to 15. Is UIPickerView still a good choice under these conditions?
I do not want to use a UITableView because there are some other controls I need to display in this view.

A: 

You don't think you can put other controls in a UITableView? UITableView is much more customizable than UIPickerView.

mahboudz
A: 

You could make a UITableView a subview if your view, and set its frame so it would occupy only a certain amount of screen-space. That way, your other controls would still fit. This way, you could even expand the UITableView's height while being scrolled, so the user could see more data, or shrink it if the number of options is small. Perhaps you can do the same with UIPickerView, but it would indeed look a little bit odd to have a UIPickerView with only two data items...

luvieere
Thanks, I ended up adding UITableView and buttons below it.
Umark