1

In my iOS app, I need to create drop down menu (I mean Select element to chose item) in a dynamic form whereas its content from Json then I need to use the value comes from drop down menu to create another. I have created my design in Storyboard but i didn't find any Object allow me to create it.

user3653710
  • 25
  • 1
  • 4
  • You have to use table view for creating the drop down menu – souvickcse May 20 '14 at 10:20
  • What about using a UIPickerView to show the options? You could also use a UITableView for the same. StackOverflow has several such questions with answers to creating menu's like you describe. – batman May 20 '14 at 10:21

3 Answers3

3

You can use UIPickerView

UIPickerView .

Apple Documentation about UIPickerView

Tutorial on StackOverflow

Community
  • 1
  • 1
Pancho
  • 4,099
  • 1
  • 21
  • 32
1

Check out DropdownMenu on GitHub

DropdownMenu is a navigation controller for setting the view of a ContainerViewController using a dropdown menu.

enter image description here

E-Riddie
  • 14,660
  • 7
  • 52
  • 74
-1

My first idea was to create a new view and have it a tableview inside. Present the view above your main view, when you select an item just remove the view from the main view. Hope it gives you an idea

Another idea is to have a PopOver View. I guess you have to google for a PopOver example on your iPhone

regards

Johan

baliman
  • 588
  • 2
  • 8
  • 27
  • `UIPopoverViewController`s are for iPad not iPhone, unless you use a third party library which I am sure there will be one on github – Popeye May 20 '14 at 10:32
  • There are a lot of tutorials that use popover for iphone, you do not have to use third party libraries. Follow this tutorial on youtube https://www.youtube.com/watch?v=1iykxemuxbk – baliman May 20 '14 at 11:32
  • They will be using a third party library then, please refer to https://developer.apple.com/library/iOs/documentation/UIKit/Reference/UIPopoverController_class/Reference/Reference.html and see `"Popover controllers are for use exclusively on iPad devices"` they are exclusive to iPad only and not iPhone. Please read Apple documentation. – Popeye May 20 '14 at 11:41
  • Just watched your link this will get your App rejected from the App Store Review process, please also see the comments of the link that state that it will get rejected and see this http://stackoverflow.com/questions/10468215/monotouch-uipopover-iphone-override-popoversdisabled going to give -1 for suggesting a way that will get app rejected. – Popeye May 20 '14 at 11:43