-
Notifications
You must be signed in to change notification settings - Fork 359
How can I get the same default 'Theme-colors' as UIActionSheet? #24
Copy link
Copy link
Open
Description
I really like how the Popup-menu's are done, but I'm looking for a quick and easy way to get the same look-and-feel as the default UIActionSheet, that is: a white-backgroundcolor and black textColor.
Can you give some hints where I should make the changes, or perhaps make some methods with which I can easily adopt the iOS standard look-and-feel color-scheme regarding UIActionSheet?
Thanks in advance!
I already found the solution e.g.:
- To get the white backgroundcolor change in KxMenu.m KxMenuView the following method:
define USE_UIACTION_COLORS 1
- (void)drawBackground:(CGRect)frame
inContext:(CGContextRef) context
{
#if defined(USE_UIACTION_COLORS) && (USE_UIACTION_COLORS == 0)
CGFloat R0 = 0.267, G0 = 0.303, B0 = 0.335;
CGFloat R1 = 0.040, G1 = 0.040, B1 = 0.040;
#else
CGFloat R0 = 1.0, G0 = 1.0, B0 = 1.0;
CGFloat R1 = 0.961, G1 = 0.961, B1 = 0.961;
#endif
and to get the blueish button colors change in the mkContentView:
- Using the same defined macro above:
#if defined(USE_UIACTION_COLORS) && (USE_UIACTION_COLORS == 0)
titleLabel.textColor = menuItem.foreColor ? menuItem.foreColor : [UIColor whiteColor];
#else
UIColor *textColor = [UIColor colorWithRed:0/255.0f green:118/255.0f blue:225/255.0f alpha:1.0];
titleLabel.textColor = menuItem.foreColor ? menuItem.foreColor : textColor;
#endif
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels