How to change navigationBar height in iOS 11?
Your code is working fine and it´s nothing wrong with it. If you change the background color of your customNavigationBar
you´ll see that you´ll get the navigation bar with the desired height. But it seems like it´s an issue with Xcode 9 to hide the default navigation bar.
Your code with:
Xcode 9
Xcode 8
As you can see in the Xcode 9 image, you have the custom navigation bar but the default one does not hide. Probably a bug in Xcode 9, I did not manage to hide it through the Storyboard either.
This seems to be a bug in Xcode 9, bug reports has been filed to Apple.
Large navigation bar custom height
Ok, I found this way:
let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.minimumLineHeight = 200
let attributes: [NSAttributedString.Key: Any] = [ .paragraphStyle: paragraphStyle]
let navigationBar = navigationController?.navigationBar
if #available(iOS 13, *) {
if let appearance = navigationBar?.standardAppearance {
appearance.largeTitleTextAttributes = attributes
navigationBar?.standardAppearance = appearance
navigationBar?.scrollEdgeAppearance = appearance
}
} else {
navigationBar?.largeTitleTextAttributes = attributes
}
How can I increase the height of the Navbar
You can't increase the size of inner elements just by increasing the height of the navbar.
You have to do it either like this--
.navbar .navbar-nav > li > a {
line-height: 45px;
}
or like this
.navbar .navbar-nav > li > a {
padding: 27px 15px;
}
Cant change navigation bar height ios 11
Changing the height of the UINavigationBar is no longer directly supported in iOS 11 (see here, here & here).
The best you can hope for is to do something like having a view behind the navigation bar and removing the borders (see here for customisation examples).
Related Topics
Swift: Retrieving Text from a Uitextfield in a Custom Uitableviewcell and Putting It in an Array
Aes/Cbc/Pkcs5Padding in iOS Objective C Result Differs from Android
Missing Marketing Icon Xcode Bug
iOS Nested View Controllers View Inside Uiviewcontroller's View
Face Recognition on the Iphone
How to Remove the Authorization Prompt from Command-Line Instances of Instruments (Xcode)
How to Generate a Barcode from a String in Swift
How to Download Files from Uiwebview and Open Again
iOS Storyboard Passing Data Navigationviewcontroller
Opengl Es 2.0 to Video on iPad/Iphone
iOS Automatically Add Hyphen in Text Field
Parse Multipart Response for Image Download in iOS
What Is Build Object File Extension in iOS
Uikeyboardboundsuserinfokey Is Deprecated, What to Use Instead
Development Team Not Showing in Xcode
Atos and Dwarfdump Won't Symbolicate My Address
How to Display the Standard Checkmark on a Uicollectionviewcell
App Store Connect Message: Your Account Will Soon Need to Be Migrated to Federated Auth