I have a method as below:
- (IBAction)GoToMyWebsite:(id)sender
{
[self.window makeKeyAndVisible];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:cc.BPS_WEB_ADDRESS]];
exit(0);
}
How can I connect this method to a tab bar item? So that when I click the specific tab bar item, this method will be executed.
Thanks
UPDATE
- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item { NSLog(@"didSelectItem: %d", item.tag); }