【问题标题】:Error with "Self" [Self presentmodalviewcontroller]“自我”错误 [自我呈现模态视图控制器]
【发布时间】:2014-12-09 12:11:06
【问题描述】:
- (void)viewDidLoad {
    [super viewDidLoad];
    
   }

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    
    PFLogInViewController *login = [[PFLogInViewController alloc]init];
    login.fields = PFLogInFieldsUsernameAndPassword | PFLogInFieldsLogInButton;
    [self presentModalViewController:login animated:YES];
  
     
}

- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

    // Release any cached data, images, etc that aren't in use.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

@end

我收到一条错误消息,提示“Self”在 iOS 6 中已贬值。关于如何解决此问题的任何想法?这是 Parse 上的登录屏幕。

【问题讨论】:

    标签: xcode parsing authentication


    【解决方案1】:

    请改用presentViewController:animated:completion:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多