3

This is my design to create custom navigation bar.

I am trying this output.

I am hardly trying to change navigation bar height. I have tried many links from Stack Overflow but can not figure it out. this is reference image i want to make a same navigation bar. i don't want to use UIView.

Facing issue - Can not change height of navigation bar.

i am using this code.

// First
self.navigationController!.navigationBar.frame = CGRect(x: 0, y: 0, width: self.view.frame.size.width, height: 80.0)

// Second
for subview in (self.navigationController?.navigationBar.subviews)! {
       if NSStringFromClass(subview.classForCoder).contains("BarBackground") {
            var subViewFrame: CGRect = subview.frame
            // subViewFrame.origin.y = -20;
            subViewFrame.size.height = 100
            subview.frame = subViewFrame

        }

    }
Ankit Kargathra
  • 309
  • 3
  • 16

1 Answers1

0

You can use default navigation bar property form Storyboard. Reference for more. Set as per application theme.

You can also change programatically. In some of the screens Larger navigation is not required then you can set from controller class also.

Maulik Rajani
  • 639
  • 8
  • 17