5

I want to when I click on navigation bar button, it will expand a list option menu for me to handle each item in it. Does iOS supports it? And how to do it in swift?

enter image description here

Twitter khuong291
  • 11,328
  • 15
  • 80
  • 116

2 Answers2

2

Using popover that is a good candidate for you: How to present popover or display a popover in Swift. Also, you can create custom UIView by yourself.

Community
  • 1
  • 1
phuongle
  • 1,166
  • 11
  • 17
1
  1. create one view for pop-up and in view set you want(create class for this view)
  2. set one button in navigation
  3. create action for the navigation button
  4. in button action set view is hide or show

    @IBAction func button(sender: AnyObject) {
        if (view.hidden){
            view.show = true
        }else{
            view.show = false
        }
    }
    
rmaddy
  • 314,917
  • 42
  • 532
  • 579
Sanandiya Vipul
  • 764
  • 4
  • 16