2

This is maybe a simple question, but I don't have a clue the keyword i had to search for this...

I want to create a simple selector (I called it spinner in Android). This is what i want to achieveenter image description here

Or it will take a whole screen if it's in ipod touch / iphone.

So, I have 3 button that represent filter (category, country, sort) for a ListView... and if I press one of the button, a popover / dialog should be appear to select the filter for each button.

thanks...

Please let me know if I need to add some information to make the question clear.

Tek Yin
  • 3,011
  • 3
  • 25
  • 42
  • I think you should take a look at this one: http://stackoverflow.com/questions/5190527/expand-collapse-uitableviewcell?rq=1 – xapslock Aug 27 '12 at 11:50

2 Answers2

1

Its not so much typical that is it appearing.

Create a new UIViewController class with xib and adjust view size you want to display for combo box or popviewControoler. Then put navigation controller over and tableviewController.

And customize your UIViewController using its controller class. Controller class will be reponsible for displaying and selecting data.

Now in your MainViewController From where you want to show ComboBox or popviewcontroller.

declare popViewController instance variable,synthesize it. implement a userdefined method here alloc your popviewcontroller class and assign it to popviewController instance variable of your class.

Then called it didSelectRowAtIndexPath.

When popover dismiss you set popViewController result in instance variable of this class so it can easily access in MainViewController class.

Pandey_Laxman
  • 3,889
  • 2
  • 21
  • 39
  • @Tek Yin, Do you need the source for it? let me know I can code it in few lines. thanks, Glad to help you if possible just press up arrow to upvote my ans. – Pandey_Laxman Oct 01 '12 at 09:18
1

You can achieve combo box like functionality by adding a UItableView in a UIView and implement all the delegates of UITableView in that custom view.

Now you can add object of that custom UIView where ever you want that combo. Just you have to workout with some Frame setting.

Mihai Iorga
  • 39,330
  • 16
  • 106
  • 107
Venu Gopal Tewari
  • 5,672
  • 42
  • 41