我准备把头撞在桌子上。或者我只是太累了。谁能借第二双眼睛告诉我为什么下面的最后一个 if 语句会产生错误?
非常感谢
#import "BAWelcomeViewController.h"
@interface BAWelcomeViewController ()
@end
@implementation BAWelcomeViewController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (void)viewWillAppear:(BOOL)animated {
if (![PFUser currentUser]) {
[self performSegueWithIdentifier:@"Show Login View" sender:self];
return;
}
[self performSegueWithIdentifier:@"Show Main View" sender:self];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (void)performSegueWithIdentifier:(NSString *)identifier sender:(id)sender {
if ([[segue identifier] isequaltostring:@"Show Login View") {
//do something here
}
}