Lê Khánh Vinh Lê Khánh Vinh - 1 year ago 100
iOS Question

Add a Switch to Navigation Bar using Storyboard

I'm trying to add a

Item through my storyboard. The problem is that when I connect to outlet or action. There is only 1 choice (
) and no Switch Item. How can we add switch to
and control the on off state?

enter image description here

Tim Tim
Answer Source

The switch is inside the BarButtonItem. Find it in the hierarchy and drag from there.

enter image description here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download