How do I programmatically make my UINavigationBar (which doesn't have a UINavigationController) have a prompt whom's text value equals webTitle
.
I've tried the following with no luck:
self.navigationItem.prompt = webTitle;
The only way I have been able to create a prompt is by applying the following settings onto the NavigationBar in IB.
I'm assuming your UINavigationBar belongs to whatever has the webTitle variable. Let's say the UINavigationBar exists as a property called navigationBar, then you can use this
self.navigationBar.topItem.prompt = webTitle;
Proper way is
self.navigationItem.prompt = @"Hello";
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