Question

I am using MWPhotoBrowser in my ARC project. Everything is working fine. I want to hide back button. In performLayout() function, I tried below code to hide back button but its not working.

self.navigationController.navigationItem.backBarButtonItem = nil;

or

self.navigationItem.backBarButtonItem = nil;

or

self.navigationItem.hidesBackButton = YES;

Any idea how to do this?

Was it helpful?

Solution

In MWPhotoBrowser.m find the following line:

self.previousViewControllerBackButton = previousViewController.navigationItem.backBarButtonItem;

and change it to:

self.previousViewControllerBackButton = nil;

OTHER TIPS

@KingPolygon, @iOSDev. As my account is short of minimum reputations to comment, so I am using this option.

I have done it same as you described but, backButton doesn't removed on my side.

//_previousViewControllerBackButton = previousViewController.navigationItem.backBarButtonItem; _previousViewControllerBackButton = nil;

I did above in -performLayout;

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top