Is there a way to delete the bottom border that iOS7 automatically displays under the navigationbar?
You can find the Website View menu in what's called the Smart Search field at the top of the Safari interface. Launch the app and navigate to a website, then tap the "aA" icon in the upper left corner of the screen. Simply select Hide Toolbar from the dropdown menu, and the toolbar will shrink to show just the URL.
Select the NavigationBar widget and uncheck "Translucent".
Start with Navigation ControllerCreate a single view application in Xcode. Add two view controller into your storyboard. Create two different swift files for those view controllers and set identifiers for them. Take a button in each view controller, set constrain for them and customize as you want.
That does not work on iOS7 with navigation translucent or not...
A paste from Apple documentation;
Description The shadow image to be used for the navigation bar. The default value is nil, which corresponds to the default shadow image. When non-nil, this property represents a custom shadow image to show instead of the default. For a custom shadow image to be shown, a custom background image must also be set with the setBackgroundImage:forBarMetrics: method. If the default background image is used, then the default shadow image will be used regardless of the value of this property.
So basically you need to implement that setBackgroundImage. Additional note, on iOS7 you won't use appearance anymore but you'll modify the Navigation bar in the viewController context where you are now.
That is:
[self.navigationController.navigationBar setShadowImage:[[UIImage alloc] init]];
[self.navigationController.navigationBar setBackgroundImage:[[UIImage alloc]init] forBarMetrics:UIBarMetricsDefault];
In my case I put this in viewDidLoad (custom behavior can be added for each UIViewController in the UINavigationViewController).
If i understand you correctly try
[[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]];
based on muffed2k answer+ programming Thomas comment, this is what I'm using to show UINavigationBar without background image (ios5.1/6.0) and without bottom border(ios7.0) :
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 6)
{
[[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]];
[[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
}else
{
[[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With