I have a tab bar controller with 6 tabs. The 6th tab I want to simply do an action (like rate this app) and not move to a new view.
The tab bar elements need to have a view object, so is there any way I can work around this to directly call a selector which will perform an action.
EDIT:
Here is the selector I would like to call from my 6th tab and continue remain on the current view.
-(void)action_rateThisApp:(id)sender {
NSString *str = @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa";
str = [NSString stringWithFormat:@"%@/wa/viewContentsUserReviews?", str];
str = [NSString stringWithFormat:@"%@type=Purple+Software&id=", str];
// Here is the app id from itunesconnect
// http://itunes.apple.com/us/app/cricbuzz-cricket-scores-news/id360466413?mt=8
str = [NSString stringWithFormat:@"%@360466413", str];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
}
You can implement the delegate function
To intercept the tab bar item touch. From there you can do whatever you want. You can generate the interface view you want for rating your app and add it to your main window (so that it is superimposed on the current view, whichever tab you are currently on).