Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set iOS navigationItem prompt without animation?

Tags:

ios

When I set

self.navigationItem.prompt = @"";

in viewDidLoad, it animates the navigationBar taller. I want to show it taller, but without the animation. How can I lose the animation?

like image 520
james0n Avatar asked Dec 20 '22 03:12

james0n


1 Answers

This seems to do the trick:

[UIView setAnimationsEnabled:NO];
self.navigationItem.prompt = @"";
[UIView setAnimationsEnabled:YES];
like image 87
james0n Avatar answered Dec 24 '22 11:12

james0n