modalviewcontroller
を却下した後にviewwillappear
に電話をかけるにはどうすればよいですか?modalviewcontrollerを閉じた後にビューを表示する
はモーダル私のViewControllerを提示:// firsviewcontroller を:
-(IBAction)AddActivity:(id)sender{
CreateActivity *addViewController = [[CreateActivity alloc] initWithNibName:@"CreateActivity" bundle:nil];
addViewController.delegate = self;
addViewController.modalPresentationStyle = UIModalPresentationFormSheet;
addViewController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:addViewController animated:YES];
addViewController.view.superview.frame = CGRectMake(50, 260, 680, 624);
}
// secondvioewcontroller:私はこれを却下するalertviewを作成するために私viewwillappear
が呼び出されませんでしたが却下した後
任意のアイデアくださいモーダルビューですが、ビューウィリアーピアは呼ばれませんでした:
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
if (buttonIndex == 0){
if ([self respondsToSelector:@selector(presentingViewController)]){
[self.presentingViewController dismissModalViewControllerAnimated:YES];
}
else {
[self.parentViewController dismissModalViewControllerAnimated:YES];
}
}
}
あなたは確信していますか?どのようにチェックしていますか?私の経験では、表示されたモーダルが解除されたときに、viewWillAppearは常に表示されているView Controllerに対して起動します。 – geraldWilliam
私は自分の投稿を編集して、私が何をしたのか、私は何が欠けているのか見ていますか? –
@OuassimMouyarden物事に入る前にOOPについて正しく考える方法を学ぶ必要があります。それが言われても、私はまだあなたのために助けてくれるでしょう。あなたのUIAlertViewのボタンが押されたときに、正確に何をしたいですか? –