The rounded highlight the segmented control slides over its selected segment.
More...
#include <SVSegmentedThumb.h>
|
| (instancetype) | - initWithFrame: |
| | Builds the thumb with its library defaults (clear background, white text on a black shadow offset up by one point, gray tint, and shadow casting enabled).
|
| (void) | - activate |
| | Restores the thumb to its unselected look, showing the primary label unless the control crossfades labels while dragging.
|
| (void) | - deactivate |
| | Puts the thumb into its selected look, hiding the primary label unless the control crossfades labels while dragging.
|
|
| SVSegmentedControl * | segmentedControl |
| | The owning segmented control.
|
| UIImage * | backgroundImage |
| | A custom image drawn in place of the default gradient when the thumb is unselected.
|
| UIImage * | highlightedBackgroundImage |
| | A custom image drawn in place of the default gradient when the thumb is selected.
|
| UIColor * | tintColor |
| | The colour multiplied over the default gradient with the overlay blend mode.
|
| UIColor * | textColor |
| | The label text colour.
|
| UIColor * | textShadowColor |
| | The label text shadow colour.
|
| CGSize | textShadowOffset |
| | The label text shadow offset.
|
| BOOL | shouldCastShadow |
| | Whether the thumb casts a drop shadow.
|
| BOOL | selected |
| | Whether the thumb is in its selected (pressed) look.
|
| UIColor * | shadowColor |
| | Alias of textShadowColor.
|
| CGSize | shadowOffset |
| | Alias of textShadowOffset.
|
| BOOL | castsShadow |
| | Alias of shouldCastShadow.
|
| UIFont * | font |
| | The font of both labels.
|
| UILabel * | label |
| | The primary title label, created lazily and added as a subview on first access.
|
| UILabel * | secondLabel |
| | The secondary (crossfade) title label, created lazily and added as a subview on first access.
|
The rounded highlight the segmented control slides over its selected segment.
It renders either a caller-supplied background image or, by default, a device-gray gradient pill tinted with tintColor, and carries the segment's title in two crossfading labels.
◆ activate
Restores the thumb to its unselected look, showing the primary label unless the control crossfades labels while dragging.
- Ghidra address:
- 0x1706b4
◆ deactivate
Puts the thumb into its selected look, hiding the primary label unless the control crossfades labels while dragging.
- Ghidra address:
- 0x170760
◆ initWithFrame:
| - (instancetype) initWithFrame: |
|
(CGRect) | frame |
|
Builds the thumb with its library defaults (clear background, white text on a black shadow offset up by one point, gray tint, and shadow casting enabled).
- Parameters
-
- Returns
- The initialised thumb.
- Ghidra address:
- 0x16f508
- Ghidra address:
- 0x16f508
◆ backgroundImage
| - (UIImage*) backgroundImage |
|
readwritenonatomicstrong |
A custom image drawn in place of the default gradient when the thumb is unselected.
Setting it also toggles the drop shadow: the shadow casts only when there is no background image.
- Ghidra address:
- 0x170850 (getter), 0x16fd84 (setter)
◆ castsShadow
Alias of shouldCastShadow.
The setter forwards to -setShouldCastShadow:.
- Ghidra address:
- 0x17090c (getter), 0x170824 (setter)
◆ font
The font of both labels.
The getter reads the primary label's font; the setter pushes the value onto both labels.
- Ghidra address:
- 0x16f8c8 (getter), 0x16fe84 (setter)
- Ghidra address:
- 0x16f8c8
◆ highlightedBackgroundImage
| - (UIImage*) highlightedBackgroundImage |
|
readwritenonatomicstrong |
A custom image drawn in place of the default gradient when the thumb is selected.
- Ghidra address:
- 0x170860 (getter), 0x170870 (setter)
◆ label
The primary title label, created lazily and added as a subview on first access.
- Ghidra address:
- 0x16f680
◆ secondLabel
| - (UILabel *) secondLabel |
|
readnonatomicstrong |
The secondary (crossfade) title label, created lazily and added as a subview on first access.
- Ghidra address:
- 0x16f7a4
◆ segmentedControl
|
|
readwritenonatomicunsafe_unretained |
The owning segmented control.
Held unretained (a back-pointer to the parent).
- Ghidra address:
- 0x170830 (getter), 0x170840 (setter)
◆ selected
Whether the thumb is in its selected (pressed) look.
The setter fades the thumb and marks it for redisplay.
- Ghidra address:
- 0x1708d8 (getter), 0x1705ec (setter)
◆ shadowColor
Alias of textShadowColor.
The setter forwards to -setTextShadowColor:.
- Ghidra address:
- 0x1708e8 (getter), 0x170818 (setter)
◆ shadowOffset
Alias of textShadowOffset.
The setter forwards to -setTextShadowOffset:.
- Ghidra address:
- 0x1708f8 (getter), 0x17080c (setter)
◆ shouldCastShadow
| - (BOOL) shouldCastShadow |
|
readwritenonatomicassign |
Whether the thumb casts a drop shadow.
The setter drives the layer's shadow opacity.
- Ghidra address:
- 0x1708c8 (getter), 0x170110 (setter)
◆ textColor
The label text colour.
The setter pushes the value onto both labels.
- Ghidra address:
- 0x170894 (getter), 0x16ff28 (setter)
◆ textShadowColor
| - (UIColor*) textShadowColor |
|
readwritenonatomicassign |
The label text shadow colour.
The setter pushes the value onto both labels' shadowColor.
- Ghidra address:
- 0x1708a4 (getter), 0x16ffcc (setter)
◆ textShadowOffset
| - (CGSize) textShadowOffset |
|
readwritenonatomicassign |
The label text shadow offset.
The setter pushes the value onto both labels' shadowOffset.
- Ghidra address:
- 0x1708b4 (getter), 0x170070 (setter)
◆ tintColor
The colour multiplied over the default gradient with the overlay blend mode.
Setting it marks the thumb for redisplay.
- Ghidra address:
- 0x170884 (getter), 0x16fe10 (setter)
The documentation for this class was generated from the following files: