3

I have a custom interactive transition which requires me to hide the standard back button. Basically, the transition looks like a push from left-to-right rather than the standard right-to-left push we're all familiar with. That's why my back button is on the right side instead.

As you can see from two screenshots I took before and after cancelling pop transition activated by a UIScreenEdgePanGestureRecognizer, once the transition is cancelled there is a "..." where the back button would be.

Before and After Cancelling the transition

I'm currently using

self.navigationItem.hidesBackButton = YES;

and I've tried putting it in awakeFromNib, viewDidLoad, viewDidAppear, viewWillAppear methods all without fixing the problem.

So using the power of Reveal.app I investigated the view hierarchy before and after and saw this:

View hierarchy before and after via reveal.app

What you see highlighted in each part of the image is what appears to be changing in the area of the nav bar that contains the hidden back button. Before it's a UINavigationButton and then it becomes a UINavigationButtonItem with a UILabel, which must be what contains the "..." and remains like this.

Any help would be much appreciated. I hope this is detailed enough to give a good picture of the issue.

4

1 に答える 1

2

最初に空の戻るボタンを作成してみてください (VC がプッシュされる前に親ビューコントローラーで) - おそらく、「...」UILabelが作成されなくなります。

self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStyleBordered target:nil action:nil];

別のアイデア: 親 vc タイトルを空の文字列に設定するだけです。

self.title = @"";

于 2013-11-08T18:11:36.437 に答える