我尝试在我的应用中实现Apple Pay,但是我遇到了一个错误,错误提示为"Application tried to present a nil modal view controller on target"。请问以下代码段中有哪里出错了。
PKPaymentAuthorizationViewController *vc = [[PKPaymentAuthorizationViewController alloc] initWithPaymentRequest:payment];
vc.delegate = self;
[self presentViewController:vc animated:YES completion:nil];