intl
intl

Reputation: 2773

iPhone - Switch Tab from UIWebView

I have a webview and I want to manually switch to another tab during a specific event. The event is arbitray, but I can't figure out hwo to switch teh tab. On my other views, I have the following code:

self.tabBarController.selectedViewController = [self.tabBarController.viewControllers objectAtIndex:2];

However, this does not work in my custom UIWebView class. Is there a simple solution to this?

Thanks

Upvotes: 0

Views: 646

Answers (1)

FKDev
FKDev

Reputation: 2286

You can use the selectedIndex property to change tab.

Which version the SDK are you using ? Because prior to version 3.0, only the invisible tab could displayed by selectedViewController. (see the 3.0+ SDK doc for selectedViewController).

Upvotes: 1

Related Questions