2016-03-16 51 views
0

我想下面的代碼轉換成目標C,如何迅速代碼轉換成目標C

func application(application: UIApplication, 
       continueUserActivity userActivity: NSUserActivity, 
       restorationHandler: (([AnyObject]!) -> Void)) 
       -> Bool { 

    let userInfo = userActivity.userInfo as NSDictionary 
    println("Received a payload via handoff: \(userInfo)") 
    return true 
} 

請幫助我的人。

回答

3
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler 
{ 
    NSDictionary *userInfo = userActivity.userInfo; 
    NSLog(@"Received a payload via handoff: %@", userInfo); 
    return YES; 
} 

是這樣的?

+0

唯一棘手的部分是'restorationHandler',但它甚至沒有使用,所以... – Thilo