1

I have two view controller e.g. controller A and Controller B i am presenting a controller B on click of a button on controller A by using this code

- (IBAction)CategoriesTapped:(id)sender {
    CategoriesViewController  * category=[[CategoriesViewController alloc]initWithNibName:@"CategoriesViewController" bundle:Nil];
    [self presentViewController:category animated:YES completion:^
     {
         NSLog(@"Loaded...");
     }
     ];
}

and i am dismissing this controller on click of button on controller B as :

- (IBAction)CloseTapped:(id)sender {
    [self dismissViewControllerAnimated:YES completion:^
     {         
        NSLog(@"dismissed...");
     }
     ];

}

It works fine the first time, but when I try to present this controller again, the app crashes with exc_bad_access. I can't figure out what the problem actually is so please can anybody help me out of this situation? Thanks in advance.

bneely
  • 9,083
  • 4
  • 38
  • 46
Agent Chocks.
  • 1,312
  • 8
  • 19

1 Answers1

1

Look like zombie. Run profiler with searching for zombies.

Josshad
  • 894
  • 7
  • 14