Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add a UISegmentedControl to my UIToolbar using Storyboard?

  1. I'm trying to add a Segmented Control to my UIToolbar below, but when I try to drag it over in Storyboard it replaces my Table View.
  2. Also, when I try to add UIBarButton to my Toolbar it pushes my Prototype Cells down... do I have my views hierarchy wrong?
  3. When I add a UIBarButton item anyway, in the simulator the toolbar is not Black Transparent as I set in my navigation control inspector. Whats up with that?

thanks!

enter image description hereenter image description here

like image 659
user1337645 Avatar asked Dec 16 '22 22:12

user1337645


1 Answers

To create Segmented Control element in the toolbar with Interface builder it is possible to use the following hint

1) Create Segmented Control Bar Button Item in Navigation Controller:

Create Segmented Control Bar Button Item in Navigation Controller

2) Drag Bar Button Item up to Navigation Item

Drag Bar Button Item up to Navigation Item

3) Then you should get the following structure

The resulting structure

4) Now you can select Segmented Control to set its properties

Select Segmented Control to set its properties

like image 107
voromax Avatar answered May 08 '23 08:05

voromax