Akhil Jiji
Akhil Jiji

Reputation: 185

How to hide this back button?

I want to hide this back button drop down every time I swipe rightwards.How is this possible?

I need a code which I can use it in AppDelegate so that i can use it globally rather than changing it for every ViewControllers.

enter image description here

Upvotes: 2

Views: 79

Answers (3)

imjaydeep
imjaydeep

Reputation: 978

Select your Navigation Controller and Uncheck Shows Navigation Bar as per below Image

enter image description here

Upvotes: 2

Aamir
Aamir

Reputation: 17007

Well this code works in Appdelegate or in any ViewController.

In action of swipe rightwards add following line of code:

[[self navigationController] setNavigationBarHidden:YES animated:YES];

If you want to show it again use following code in appropriate method:

[[self navigationController] setNavigationBarHidden:NO animated:YES];

Upvotes: 0

tuledev
tuledev

Reputation: 10327

self.navigationItem.setHidesBackButton(true, animated:false);

Upvotes: 0

Related Questions