My App crashed because I set time from one ViewController to one ViewController in AppDelegate.m for method below and it show the message : unrecognized selector sent to instance 0x6a0e360.
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[self performSelector:@selector(toSecondViewController:) withObject:nil afterDelay:5];
}
-(void)toSecondViewController{
SecondViewController *second = [[SecondViewController alloc] init];
[self.navigationController pushViewController:sale animated:YES];
}
I don’t know why ?
try change code
to
If func is not have any parameter, then don’t add “:” symbol after func name