Reputation: 43
Some Body please help me to migrate this following code from objective C to swift2.
ccRegistrationVC.completionBlock = ^(BNCCRegCompletion completion, BNAuthorizedCreditCard *card){
[self.navigationController popViewControllerAnimated:YES];
};
Upvotes: 0
Views: 65
Reputation: 1248
full
ccRegistrationVC.completionBlock = { (completion: BNCCRegCompletion, card: BNAuthorizedCreditCard) in
self.navigationController.popViewControllerAnimated(true)
}
shorter
ccRegistrationVC.completionBlock = {
self.navigationController.popViewControllerAnimated(true)
}
You might need to add some unwraps on the navigationController line
Upvotes: 1