UITabBar
5 つのタブを持つプロジェクトがあります。
無料版と有料版の 2 つのターゲット バージョンを作成しています。
無料版では、ユーザーがタブ アイテム インデックス 3 または 4 に移動しようとUIAlertView
すると、次のような基本的なメッセージが表示されます。
アップグレードしますか?
はい / キャンセル
ボタンを押すCancel
と、ビューは最初のView Controllerに移動する必要があります。
どうすればいいですか?
また、私の次の質問 (スタックで別の質問をする必要があることは承知しています) はUIAlertView
、有料版で が表示されないようにする方法です。
タブ項目 3 & 4のボタンを使用するところまで来ましたUIAlertView
が、それはしたくありません。
2 つのターゲットは正常に機能しており、次のコードを使用しています。
- (IBAction)openAlert:(id)sender
{
#ifdef FREE
UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"Attention"
message:@"Choose option"
delegate:self
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"Download Full version", nil];
[alertView show];
#endif
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (buttonIndex ==1) {
[[UIApplication sharedApplication]openURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://***.com"]]];
}
}
どんな助けでも大歓迎です。