我想在收到twitter登录回复后转到下一个屏幕

时间:2017-11-24 10:44:25

标签: objective-c xcode

一旦我收到来自Twitter登录的回复,

就无法移动到下一个屏幕。

 [[Twitter sharedInstance] logInWithCompletion:^(TWTRSession *session, NSError *error) {
    if (session) {
        NSLog(@"signed in as %@", [session userName]);
        NSString *userStr = [session userName];
        NSString *userStr1 = [session userID];
        UIStoryboard *strory = [UIStoryboard storyboardWithName:@"Main" bundle:nil];

        phoneViewController *editobj = [strory instantiateViewControllerWithIdentifier:@"phoneViewController"];

        [self presentViewController:editobj animated:YES completion:nil];
    } else {
        NSLog(@"error: %@", [error localizedDescription]);
    }
    UIStoryboard *strory = [UIStoryboard storyboardWithName:@"Main" bundle:nil];

    phoneViewController *editobj = [strory instantiateViewControllerWithIdentifier:@"phoneViewController"];

    [self presentViewController:editobj animated:YES completion:nil];

}];

0 个答案:

没有答案