Navigation Bar Items Swift

Hello everyone, the topic that I want to share with you today is the navigation bar items that we use frequently in our application.

First of all, how do we add the navigation bar item to our application that I want to tell you about?

The add button we want to add to the right side of our navigation bar.

We call addButton function in viewdidload

Now, let’s add an item by entering the system name and this item will navigate us to page 2.

Here we both named page 2 with the title object and set the background color.

I want to show you how to use a button that seems simple to most of you.

We use Add button and you want action with addTarget.

If we want, we can add items as custom.

We can define customView according to the properties of our application.

Custom item view.

Finally, I want to mention more than one item to the navigation bar to define.

leftBarButtonItems and use in Array

iOS Developer