我的应用程序委托中有一个 NSURL 属性:
@property (nonatomic, retain) NSURL *openedURL;
...进而:
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
// attempt to extract a token from the url
self.openedURL = url;
// attempt to extract a token from the url
return [FBSession.activeSession handleOpenURL:url];
}
我想将此代码移动到普通的 UIViewController。我怎样才能做到这一点??