我正在尝试展示我已经为用户输入数据并保存在解析中的 UITableView。我很确定我没有显示导航视图。
当我登录时,我收到错误:
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];
}