0
いくつかのことを確認しながら、私のAppDelegateに読み込みメッセージを表示したいとき、そしてこのタスクを完了し、デリゲートを使って結果を得るとき、このメッセージを閉じます。AppDelegateのローディングメッセージを表示する
どうすればいいですか?私はこのソリューションを実装しますが、アラートを却下することはできません。
ここで私は、アラートを起動:あまりにAppdelegateでここ
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
_alert_news = [[UIAlertView alloc]initWithTitle:@"" message: @"telo" delegate:nil cancelButtonTitle:nil otherButtonTitles:nil, nil];
[_alert_news show];
return YES;
}
を、私は私の応答を受け取る:
#pragma mark InitializeDelegate
-(void)checkState:(NSString*)State{
NSLog(@"InitializeResult: %@",State);
[_alert_news dismissWithClickedButtonIndex:0 animated:YES];
}
おかげFIXED
!! 最後に、この問題を次のように修正しました。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
_alert= [UIAlertController
alertControllerWithTitle:@""
message:@"Loading GradiantFace ..."
preferredStyle:UIAlertControllerStyleAlert];
[self.window makeKeyAndVisible];
[self.window.rootViewController presentViewController:_alert animated:YES completion:nil];
return YES;
}
#pragma mark InitializeDelegate
-(void)checkState:(NSString*)State{
NSLog(@"InitializeResult: %@",State);
dispatch_async(dispatch_get_main_queue(), ^{
[self.window.rootViewController dismissViewControllerAnimated:YES completion:nil];
});
}
ボタンがありません。そして、UIAlertControllerを見てください。私はそれをatmにリンクすることはできません。私はモバイルです – chronikum
他の処理が進行している間に進捗ビューを使用する方が良い –
行1を_alert_news = [[UIAlertView alloc] initWithTitle:@ " @ "telo"デリゲート:nil cancelButtonTitle:@ "OK" otherButtonTitles:nil、nil]; – Rahul