Good day, everyone.
I have this code in table view controller:
else if (editingStyle == UITableViewCellEditingStyleInsert) {
if([[UIScreen mainScreen] bounds].size.height == 568)
{
citySearch = [[CitySearch alloc] initWithNibName:@"CitySearchIphone5" bundle:nil];
}
else
{
citySearch = [[CitySearch alloc] initWithNibName:@"CitySearch" bundle:nil];
}
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:citySearch];
[self presentModalViewController:navController animated:YES];
so, when it is presented i see view, that is going over bounds and Xcode write this
Presenting view controllers on detached view controllers is discouraged
how to solve it?
presentModalViewController:animated: is deprecated in iOS 6.0. Use presentViewController:animated:completion: instead.
[self presentViewController:navController animated:YES completion:nil];
Apple Documentation
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