On the cancel, to move to another UIViewController
, you simply change the self.tabBarController
object's setSelectedIndex
example:
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
switch (buttonIndex) {
case 0:
//Cancel button was clicked
[self.tabBarController setSelectedIndex:0];
break;
case 1:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://***.com"]]];
break;
}
}
As for the Free vs Paid, it's opinion-based.
One way which is basic is by using NSUserDefaults
to remember whether the app is free version or paid version and handle your logic accordingly.