Note that there are some explanatory texts on larger screens.

plurals
  1. POpresentViewController doesnt "see" my viewControllers
    primarykey
    data
    text
    <p>MainMenuViewController presents BonusViewController modally. I want to Dismiss BonusViewController then display a new BonusViewController, effectively "resetting" BonusViewController.</p> <p>Im using notifications to call this method in MainMenuViewController </p> <pre><code>-(void)resetBonus{ [self dismissViewControllerAnimated:YES completion:nil]; [self presentViewController: BonusViewController animated:NO completion:nil]; } </code></pre> <p>I expected BonusViewController to be auto-detected as I was typing it in the presentViewController call above but it was not and none of my viewControllers show up as I type which Im assuming means im doing this all wrong. Do I have to initialize the VC or allocate it before I can present it like this? Or can I even do this at all since im using storyboards?</p> <p>I also tried this though I believe this method is deprecated </p> <pre><code>-(void)resetBonus{ [self dismissModalViewControllerAnimated:YES]; [self presentModalViewController: BonusViewController animated:NO ]; } </code></pre> <p><img src="https://i.stack.imgur.com/zrJjC.png" alt="enter image description here"></p> <p>Did what Sumanth suggested but I get this message now:</p> <p><img src="https://i.stack.imgur.com/Y12r0.png" alt="enter image description here"></p> <p>so now I m doing :</p> <pre><code>#import "BonusViewController.h .... -(void)resetBonus { BonusViewController *bonus = [[BonusViewController alloc]init]; [self dismissModalViewControllerAnimated:NO]; [self presentModalViewController: bonus animated:NO ]; } </code></pre> <p>the errors are all gone but when BonusViewController is presented the display is solid black, i can hear the sounds going but cant see anything on the screen</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload