ビューでモーダルにログインビューを呼び出していますが、ルートビューコントローラーでメソッドをロードしましたが、モーダルビューコントローラーを閉じると、それが再び表示されます! 助言がありますか?コードが聞こえます:
** .h **
//
// FirstViewController.h
// Voyager
//
// Created by Peter Unger on 9/1/13.
// Copyright (c) 2013 Penumbra Software. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Parse/Parse.h>
@interface FirstViewController : UIViewController
@end
@interface DefaultSettingsViewController :
UIViewController <PFLogInViewControllerDelegate, PFSignUpViewControllerDelegate>
@end
** .m **
//
// FirstViewController.m
// Voyager
//
// Created by Peter Unger on 9/1/13.
// Copyright (c) 2013 Penumbra Software. All rights reserved.
//
#import "FirstViewController.h"
#import <Parse/Parse.h>
@interface FirstViewController ()
@end
@implementation FirstViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
PFLogInViewController *login = [[PFLogInViewController alloc] init];
login.fields = PFLogInFieldsUsernameAndPassword | PFLogInFieldsLogInButton | PFLogInFieldsSignUpButton;
login.delegate = (id)self;
login.signUpController.delegate = (id)self;
[self presentViewController:login animated:YES completion:nil];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (void)logInViewController:(PFLogInViewController *)logInController didLogInUser:(PFUser *)user {
[self dismissViewControllerAnimated:YES completion:nil];
}
- (void)signUpViewController:(PFSignUpViewController *)signUpController didSignUpUser:(PFUser *)user {
[self dismissViewControllerAnimated:YES completion:nil];
}
@end