Bhushan B
Bhushan B

Reputation: 2510

Detect Tab Selection : Tab Bar Controller

I have five tabs in my tab Bar Application. I have give access to 3rd tab on if user enters correct password in popOverController. I wanted to present that pop Over Controller when user taps(selects) that 3rd tab. How should i do it. Thanks in advance.

Upvotes: 1

Views: 217

Answers (2)

nik
nik

Reputation: 2329

Use UIPopovercontroller to present the login form on ebtering into the tabbarcontrollerview which mean first action in viewdidload. Then verify credentials and remove the login popover. Thats it.

Upvotes: 0

Nenad M
Nenad M

Reputation: 3055

Take a look at the UITabBarControllerDelegate Protocol Reference. In particular consider implementig the tabBarController:didSelectViewController: method of the beforementioned protocol, or even better the tabBarController:shouldSelectViewController: method.

Upvotes: 2

Related Questions