A button that fills itself with a solid colour and rounds its own corners.
More...
#include <StoreButton.h>
|
| UIColor * | buttonColor |
| | The fill used while the button is enabled.
|
| UIColor * | disabledColor |
| | The fill used while the button is disabled.
|
| double | cornerRadius |
| | The corner radius the button rounds itself to.
|
A button that fills itself with a solid colour and rounds its own corners.
◆ drawRect:
| - (void) drawRect: |
|
(CGRect) | rect |
|
Fills the button and draws its inner shadow.
A flat fill when disabled, otherwise a four-stop vertical gradient derived from buttonColor . The inner shadow that follows is drawn by throwing the shadow one button-width sideways and translating the mask back the same distance, so only the cast shadow lands inside the clip.
- Parameters
-
- Ghidra address:
- 0x170f34
- Ghidra address:
- 0x170f34
◆ highlightColor:factor:
| - (UIColor *) highlightColor: |
|
(double *) | components |
| factor: |
|
(double) | factor |
Lightens a colour towards white.
Each component becomes c*(1-factor) + factor . The alpha is blended too, so a partly transparent colour also becomes more opaque as the factor rises.
- Parameters
-
| components | Four components — red, green, blue, alpha — as raw doubles. |
| factor | How far towards white, from 0 to 1. |
- Returns
- The lightened colour.
- Ghidra address:
- 0x170dd4
- Ghidra address:
- 0x170dd4
◆ initWithFrame:
| - (instancetype) initWithFrame: |
|
(CGRect) | frame |
|
Builds the button.
Sets the title colour and shadow for the normal, highlighted, and disabled states, and centres the content both ways. The shadow offset depends on the screen scale so that it is one device pixel on either kind of display.
- Parameters
-
- Returns
- The initialised button.
- Ghidra address:
- 0x170998
- Ghidra address:
- 0x170998
◆ setHighlighted:
| - (void) setHighlighted: |
|
(BOOL) | highlighted |
|
Redraws when the highlight actually changes.
- Parameters
-
| highlighted | The new state. |
- Ghidra address:
- 0x170e1c
- Ghidra address:
- 0x170e1c
◆ setSelected:
| - (void) setSelected: |
|
(BOOL) | selected |
|
Redraws when the selection actually changes.
- Parameters
-
- Ghidra address:
- 0x170ea8
- Ghidra address:
- 0x170ea8
◆ buttonColor
| - (UIColor *) buttonColor |
|
readwritenonatomicstrong |
The fill used while the button is enabled.
Defaults to UIColor.blueColor , built on first read rather than in the initialiser.
- Ghidra address:
- 0x170c4c (getter)
- Ghidra address:
- 0x170c4c
◆ cornerRadius
The corner radius the button rounds itself to.
- Ghidra address:
- 0x170dac (getter)
◆ disabledColor
| - (UIColor *) disabledColor |
|
readwritenonatomicstrong |
The fill used while the button is disabled.
Defaults to UIColor.grayColor , likewise built lazily.
- Ghidra address:
- 0x170cfc (getter)
- Ghidra address:
- 0x170cfc
The documentation for this class was generated from the following files: