我们的iPad 应用程序使用UINavigationController
.
The second view managed by the navigation controller is a subclass of
, which when the correct row is chosen, pushes a
, as described on
http://code.google.com/p/gdata-objectivec-client/wiki/OAuthSignInControllers :UIPopoverController
UITableViewController
GDataOAuthViewControllerTouch
GDataOAuthViewControllerTouch *googleOAuthViewController =
[[GDataOAuthViewControllerTouch alloc] initWithScope:@"http://www.google.com/reader/api/*"
language:nil
appServiceName:kAppServiceName
delegate:self
finishedSelector:@selector(viewController:finishedWithAuth:error:)];
googleOAuthViewController.contentSizeForViewInPopover = CGSizeMake(400.0, 577.0);
googleOAuthViewController.navigationItem.title = @"Google Account";
[self.navigationController pushViewController:googleOAuthViewController animated:YES];
[googleOAuthViewController release];
成功调用完成的方法:
- (void)viewController:(GDataOAuthViewControllerTouch *)viewController
finishedWithAuth:(GDataOAuthAuthentication *)auth
error:(NSError *)error {
// error == nil
}
然而,当应用程序尝试检索订阅列表时,请求会以某种方式被取消:
Error Domain=NSURLErrorDomain Code=-1012 "The operation couldn\u2019t be completed.
代码 -1012 是 kCFURLErrorUserCancelledAuthentication = -1012(在 CFNetworkErrors.h 中定义)。
当googleOAuthViewController
被呈现为模态控制器时:
[self presentModalViewController:googleOAuthViewController animated:YES];
然后可以毫无问题地检索请求的数据。
目前尚不清楚是什么原因导致当控制器被推送到导航控制器时请求被取消以及如何解决这个问题。