So it seems like in Xcode 12 beta 2, the CPPointofInterestButton mentioned in the "Accelerate your app with CarPlay" session at 22:13 has been replaced with CPEntityButton. Has anyone been able to get CPEntityButton to have custom text but look like the buttons in the WWDC session?
Even when setting the type to custom, while I can set the button label using the buttonAttributes dictionary, the color keys & rounded rect don't appear to respond to using the enum values or putting UIColor/boolean values in. So I end up getting buttons that just have white labels and no border to indicate where the button bounds are.
Obj-C code:
I've filed a Feedback ticket here: FB8004131
Other question I have is more a general question to Apple engineers of whether we should expect the colors to only be available via enums & limited? Our UX team are concerned they can't use our preferred tint color for the primary button.
Even when setting the type to custom, while I can set the button label using the buttonAttributes dictionary, the color keys & rounded rect don't appear to respond to using the enum values or putting UIColor/boolean values in. So I end up getting buttons that just have white labels and no border to indicate where the button bounds are.
Obj-C code:
Code Block CPEntityButton *primaryButton = [[CPEntityButton alloc] initWithButtonType:CPEntityButtonTypeCustom handler:^(CPEntityButton * _Nonnull entityButton) { // Do nothing }]; primaryButton.buttonAttributes = @{ CPEntityButtonLabelKey : @"Flash Station", CPEntityButtonBackgroundColorKey : @(CPEntityButtonColors_Gray), CPEntityButtonIsRoundedKey : @(CPEntityButtonStyle_Rounded), };
I've filed a Feedback ticket here: FB8004131
Other question I have is more a general question to Apple engineers of whether we should expect the colors to only be available via enums & limited? Our UX team are concerned they can't use our preferred tint color for the primary button.