0
我試圖通過linkedin的OAuth登錄後顯示一個新的視圖控制器。但是,我收到此錯誤。LinkedIN iOS登錄提供控制器
2013-05-27 20:24:23.530 SessionLoginSample [26016:c07]警告:嘗試顯示其視圖不在窗口層次結構中! 2013-05-27 20:24:23.531 SessionLoginSample [26016:c07]是
這裏是我正在使用的代碼,任何有關解決此問題的提示將不勝感激。
- (IBAction)button_TouchUp:(UIButton *)sender
{
oAuthLoginView = [[OAuthLoginView alloc] initWithNibName:nil bundle:nil];
// register to be told when the login is finished
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(loginViewDidFinish:)
name:@"loginViewDidFinish"
object:oAuthLoginView];
[self presentModalViewController:oAuthLoginView animated:YES];
}
-(void) loginViewDidFinish:(NSNotification*)notification
{
ViewController *NVC = [self.storyboard instantiateViewControllerWithIdentifier:@"NextViewViewController"];
[self presentViewController:NVC animated:YES completion:nil];
NSLog(@"YES");
}