Hi,
i have a method called perform4 in the ViewController.m
this Method has to be called from my AppDelegate.m with this AlertView Button
Thanks
i have a method called perform4 in the ViewController.m
Code:
-(void) perform4
{
NSLog(@"perform4");
UIStoryboard *mainStoryBoard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
ViewController4 *view4 = (ViewController4 *) [mainStoryBoard instantiateViewControllerWithIdentifier:@"ViewController4"];
[self.view removeFromSuperview];
[self release];
self.view = view4.view;
[self release];
}
this Method has to be called from my AppDelegate.m with this AlertView Button
Code:
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
if(buttonIndex==0)
{
NSLog(@"Button 0");
//EVERYTHING I WILL PUT HERE DO NOT WORK OR MAKE A CRASH :/
//like
// ViewController *view1 = [[ViewController alloc]init];
// [view1 perform4];
// WHY DO THIS DONT WORK?
}
Thanks