AntonyG
AntonyG

Reputation: 224

PKAddPassesViewController dismiss animation not working

I'm struggling with the PKAddPassesViewController.

If I don't implement the addPassesViewControllerDidFinish: delegate method, its dismissal is animated (looks like a cross dissolve). However as soon as I implement the method in my delegate, I can't get the controller to be dismissed with any animation. It just vanishes, no matter how I try to dismiss it from the delegate method: dismissViewControllerAnimated:YES, dismissModalViewControllerAnimated:YES...

Any idea on this?

Thanks.

Upvotes: 3

Views: 883

Answers (2)

In the below method:-

- (void)addPaymentPassViewController:(PKAddPaymentPassViewController *)controller
 generateRequestWithCertificateChain:(NSArray<NSData *> *)certificates
                               nonce:(NSData *)nonce
                      nonceSignature:(NSData *)nonceSignature
                   completionHandler:(void(^)(PKAddPaymentPassRequest *request))handler { }

I think some of the values in the PKAddPaymentPassRequest is nil, which will be passing to iOS using a handler.

Upvotes: 0

Minal Soni
Minal Soni

Reputation: 627

Dismiss controller in delegate method solved my problem.

-(void)addPassesViewControllerDidFinish:(PKAddPassesViewController *)controller {
    [controller dismissViewControllerAnimated:YES completion:nil];
    [self updateData];
}`

Upvotes: 0

Related Questions