Hi there I have a ViewController performing a segue on a button.
- (IBAction)moveToCoolViewButtonTapped {
[self performSegueWithIdentifier:@"toCoolView" sender:nil];
}
This works fine, apart from an annoying delay the first time it's performed, I guess due to the view not being initialized yet. I obviously don't want to have to prematurely create a lot of views. (There are several others segues planned from the same viewController). So, a long shot perhaps: but I wondered if anyone had any brilliantly inspired tricks to avoid the initial lag?
try replace this
[self performSegueWithIdentifier:@"toCoolView" sender:nil];
with this
dispatch_async(dispatch_get_main_queue(),^{
[self performSegueWithIdentifier:@"toCoolView" sender:nil];
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With