使用 Present viewcontroller 您需要为 UIViewcontroller 添加单独的 NavigationController,例如:-
EKEventViewController *addController = [[EKEventViewController alloc] initWithNibName:@"EKEventViewController" bundle:nil];
UINavigationController *navController=[[UINavigationController alloc]initWithRootViewController:addController];
addController.event = self.event;
addController.allowsEditing = YES;
addController.allowsCalendarPreview = YES;
if ([self respondsToSelector:@selector(presentViewController:animated:completion:)])
{
[self presentViewController:navController animated:YES completion:nil];
}
else
{
[self presentModalViewController:navController animated:YES];
}