私は最初のRootViewControllerでナビゲーションベースのアプリケーションを持っています。iPhone - パスワードチェックを挿入
私はロック画面のようなパスワードで保護したいと思います。 私は既にパスワードチェックのコードを持っています。
しかし、私は
1)RootViewController前に、最初に私のCheckPasswordViewを挿入する方法がわかりません。
2)私のアプリケーションが一時停止から再開するたびにパスワードを入力する必要があります。
更新:
- (void)applicationDidBecomeActive:(UIApplication *)application {
/*
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
*/
CheckPasswordViewController *vc = [[CheckPasswordViewController alloc]
initWithNibName:@"CheckPasswordViewController" bundle:nil];
vc.title = @"Enter password";
[self.navigationController pushViewController:vc animated:YES];
[vc release];
}
ありがとうございました!できます。 PasswordCheckViewをapplicationDidBecomeActiveメッセージに表示します。正しいパスワードを入力した後、私はメインプログラムにパスします。しかし、コードを入力せずにアプリを何度か開いた場合、私はパスワードを何度か入力することを提案しています。 – Metaller
私の主な質問にコードを追加しました。 – Metaller
@Metaller:うれしい! –