大佬教程收集整理的这篇文章主要介绍了ios – 正在进行演示时出席?尝试在Facebook登录后使用解析显示新视图.,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
checklists[4516:c07] Warning: Attempt to present <checklistsViewController: 0x10525e90> on <UINavigationController: 0x9648270> while a presentation is in progress!
谢谢你的帮助.
#import "LoginViewController.h" #import "checklistsViewController.h" #import "SetupViewController.h" #import <Parse/Parse.h> @interface LoginViewController () @end @implementation LoginViewController - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundLeorNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundLeorNil]; if (self) { // Custom initialization } return self; } - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; PFLogInViewController *login = [[PFLogInViewController alloc] init]; login.fields = PFLogInFieldsFacebook; // Need to set the delegate to be this controller. login.delegate = self; login.signUpController.delegate = self; //signUpController is a property on the login view controller [self presentModalViewController:login animated:NO]; } - (void)logInViewController:(PFLogInViewController *)logInController didLogInUser:(PFUser *)user { [self dismissModalViewControllerAnimated:YES]; NSLog(@"successfully logged in."); checklistsViewController *controller = [[checklistsViewController alloc] initWithStyle:UITableViewStylePlain]; controller.modalTransitionStyle = UITableViewStylePlain; [self presentModalViewController:controller animated:YES]; }
presentModalViewController:animated:
你应该使用它
presentViewController:animated:completion:
同样如此
dismissModalViewControllerAnimated:
现在我们使用它
dismissviewControllerAnimated:completion:
但在您的情况下,完成块可以解决您的问题…它确保了正确的事件序列,即在解雇完成之前不会进行呈现.
- (void)logInViewController:(PFLogInViewController *)logInController didLogInUser:(PFUser *)user { [self dismissviewControllerAnimated:YES completion:^{ NSLog(@"successfully logged in."); checklistsViewController *controller = [[checklistsViewController alloc] initWithStyle:UITableViewStylePlain]; controller.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [self presentViewController:controller animated:YES completion:nil]; }]; }
以上是大佬教程为你收集整理的ios – 正在进行演示时出席?尝试在Facebook登录后使用解析显示新视图.全部内容,希望文章能够帮你解决ios – 正在进行演示时出席?尝试在Facebook登录后使用解析显示新视图.所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。