Reputation: 2024
I was wondering how I could create a Navigation Bar where the user could tap the title of the navigation bar, so that it will open a new modal view, similar to the Twitter application when the user is creating a Tweet when they have multiple accounts linked.
Upvotes: 4
Views: 2600
Reputation: 48398
You can put a custom subclass of UIView
as the titleView
of the navigation bar. The easiest thing is to make this a button (or a UIButton
on a UIView
) and set up an action to present the modal view as you like. You could instead set a view to respond to touches, but I really don't see the advantage of going that route.
Upvotes: 7