Hi,
I am trying to use the button PKAddPassButton.
The wallet image on the button is not coming when I am running it in Xcode Simulator.
Please see the Objective C code block below:
PKAddPassButton *button = [[PKAddPassButton alloc] initWithAddPassButtonStyle:PKAddPassButtonStyleBlackOutline];
button.frame = CGRectMake(50, 150, 240, 50);
[self.view addSubview:button];
Button is coming in the simulator with the title only, ie; "Add to Apple Wallet".
2. How can I change the default title to some custom title(ie; change the title "Add to Apple Wallet" to "Added to Apple Wallet").
3. How can I get the UIImage/UIImageView of the PKAddPassButton?
Xcode Version: 12.4 (12D4e)
Simulator: iPhone 11 Pro Max-14.4
macOS Catalina: version 10.15.7
Your support is highly appreciated.
Post
Replies
Boosts
Views
Activity
Dear team,
I am unable to get the title from PKAddPassButton. Please see the Objective C code block:
PKAddPassButton *button = [[PKAddPassButton alloc] initWithAddPassButtonStyle:PKAddPassButtonStyleBlackOutline];
NSString *title = [button currentTitle];
NSLog(@"Title %@", title);
Output :
Title (null)
What could be wrong in this? Kindly help.