PDA

View Full Version : UIBarButtonItem Loading UIPickerview Popup




bradnet
May 29, 2011, 03:15 PM
Hi

I've been looking at trying to load a UIPickerView as a popup to a tableview this would hopefully serve the purpose to filter the list down enough but i'm not sure how to load the picker as a pop over. I understand there is a new function for the ipad which is popover but i want this for older versions of the iphone/ipod so i believe the only method left to me is to create a seperate xib file to hold the pickerview and then load this as an actionsheet but i've not got a clue where to start and how to hookup the xib so that the value chosen will be transfered back to the original calling xib to reload the data.

Any tutorials or sample apps i could look at would be a great help.

and the barbuttonitems are programmed rather than added through interface builder if this makes any difference to the code.

Thanks
Brad



jnoxx
May 30, 2011, 02:44 AM
U have to do seperate.
Popover only exists in iPad. So what u could do, is create a XIB (if u really can't be bothered to be coding 2 seperate things for iphone/ipad).
Then present the XIB as a modalViewController when pressed on a button or whatever.