One scratch card: a jacket image under five stacked cover layers, with a rub gesture, a reveal effect, a download indicator, and a small scratch-progress state machine.
More...
#include <ScratchView.h>
|
| (instancetype) | - initWithFrame: |
| | Builds the card, its scratch button, artwork, five cover layers, and download indicator.
|
| (void) | - refreshScratchImage: |
| | Installs the artwork for a scratch entry, downloading it if it is not already on disk.
|
| (void) | - updateView: |
| | Refreshes the card from the challenge status table for its tag and resets the covers.
|
| (void) | - tapScratchView: |
| | Handles a tap on the card: selects it, or triggers an item download when it is open.
|
| (void) | - touchEndScratch: |
| | Ends a scratch gesture by clearing the scratching flag.
|
| (void) | - touchBeganScratch: |
| | Begins a scratch gesture by clearing the scratching flag.
|
| (void) | - startIndicator |
| | Starts the download indicator spinner.
|
| (void) | - moveScratchView: |
| | Advances the scratch state while the finger drags, fading the covers in staggered.
|
| (void) | - scratchEffect: |
| | Fades the reveal effect view out over the artwork.
|
| (BOOL) | - scratchContinue |
| | Continues a paused scratch: opens the card early, or resumes and refreshes.
|
| (void) | - scratchCancel |
| | Cancels a paused scratch, restoring the covers and stopping the spinner.
|
| (void) | - scratchOpen: |
| | Opens the card fully, optionally animating the five covers away.
|
| (ScratchViewState) | - getState |
| | The current scratch state.
|
| (void) | - imageSet |
| | A placeholder image-installation hook (empty in the binary).
|
| (void) | - downloaderFinished: |
| | Downloader callback: writes the fetched artwork or item to disk and refreshes.
|
| (void) | - downloaderError: |
| | Downloader callback: hides the modal dialog on an item-download failure.
|
| (void) | - downloaderProceed: |
| | Downloader callback: drives the modal dialog's progress bar during an item download.
|
| (void) | - timerUpdate |
| | A per-frame timer hook (empty in the binary).
|
| (void) | - setButtonEnable: |
| | Fades the enable-cover in or out to reflect whether scratching is allowed.
|
| (void) | - downloaderProceed: |
| | Sent periodically as data arrives, and once more on completion.
|
| (void) | - downloaderFinished: |
| | Sent when the request completes.
|
| (void) | - downloaderError: |
| | Sent when the request fails.
|
One scratch card: a jacket image under five stacked cover layers, with a rub gesture, a reveal effect, a download indicator, and a small scratch-progress state machine.
◆ downloaderError:
| - (void) downloaderError: |
|
(nullable Downloader *) | downloader |
|
Downloader callback: hides the modal dialog on an item-download failure.
- Parameters
-
| downloader | The failed downloader. |
- Ghidra address:
- 0x1affbc
◆ downloaderFinished:
| - (void) downloaderFinished: |
|
(nullable Downloader *) | downloader |
|
Downloader callback: writes the fetched artwork or item to disk and refreshes.
- Parameters
-
| downloader | The finished downloader. |
- Ghidra address:
- 0x1afcbc
◆ downloaderProceed:
| - (void) downloaderProceed: |
|
(nullable Downloader *) | downloader |
|
Downloader callback: drives the modal dialog's progress bar during an item download.
- Parameters
-
| downloader | The in-progress downloader. |
- Ghidra address:
- 0x1b0028
◆ getState
The current scratch state.
- Returns
- One of
ScratchViewState.
- Ghidra address:
- 0x1afc88
- Ghidra address:
- 0x1afc88
◆ imageSet
A placeholder image-installation hook (empty in the binary).
- Ghidra address:
- 0x1afcb8
◆ initWithFrame:
| - (instancetype) initWithFrame: |
|
(CGRect) | frame |
|
Builds the card, its scratch button, artwork, five cover layers, and download indicator.
- Parameters
-
- Returns
- The initialised card.
- Ghidra address:
- 0x1ae120
- Ghidra address:
- 0x1ae120
◆ moveScratchView:
| - (void) moveScratchView: |
|
(nullable id) | sender |
|
Advances the scratch state while the finger drags, fading the covers in staggered.
- Parameters
-
| sender | The scratch button. |
- Ghidra address:
- 0x1af0d4
◆ refreshScratchImage:
| - (void) refreshScratchImage: |
|
(nullable ScratchInfo *) | info |
|
Installs the artwork for a scratch entry, downloading it if it is not already on disk.
- Parameters
-
| info | The scratch entry describing the artwork. |
- Ghidra address:
- 0x1ae808
◆ scratchCancel
Cancels a paused scratch, restoring the covers and stopping the spinner.
- Ghidra address:
- 0x1af7c0
◆ scratchContinue
Continues a paused scratch: opens the card early, or resumes and refreshes.
- Returns
- Whether the caller should keep the card in the paused (wait) state.
- Ghidra address:
- 0x1af660
- Ghidra address:
- 0x1af660
◆ scratchEffect:
| - (void) scratchEffect: |
|
(BOOL) | show |
|
Fades the reveal effect view out over the artwork.
- Parameters
-
| show | Whether to run the effect (false is a no-op). |
- Ghidra address:
- 0x1af500
- Ghidra address:
- 0x1af500
- Ghidra address:
- 0x1af610
- Ghidra address:
- 0x1af65c
◆ scratchOpen:
| - (void) scratchOpen: |
|
(BOOL) | animated |
|
Opens the card fully, optionally animating the five covers away.
- Parameters
-
| animated | Whether to animate the covers fading out. |
- Ghidra address:
- 0x1af880
- Ghidra address:
- 0x1af880
- Ghidra address:
- 0x1afc38
- Ghidra address:
- 0x1afc84
◆ setButtonEnable:
| - (void) setButtonEnable: |
|
(BOOL) | enable |
|
Fades the enable-cover in or out to reflect whether scratching is allowed.
- Parameters
-
| enable | Whether scratching is enabled. |
- Ghidra address:
- 0x1b00f8
- Ghidra address:
- 0x1b00f8
- Ghidra address:
- 0x1b0270
- Ghidra address:
- 0x1b02bc
- Ghidra address:
- 0x1b02c0
- Ghidra address:
- 0x1b030c
◆ startIndicator
Starts the download indicator spinner.
- Ghidra address:
- 0x1af0bc
◆ tapScratchView:
| - (void) tapScratchView: |
|
(nullable id) | sender |
|
Handles a tap on the card: selects it, or triggers an item download when it is open.
- Parameters
-
| sender | The scratch button. |
- Ghidra address:
- 0x1aed40
◆ timerUpdate
A per-frame timer hook (empty in the binary).
- Ghidra address:
- 0x1b00f4
◆ touchBeganScratch:
| - (void) touchBeganScratch: |
|
(nullable id) | sender |
|
Begins a scratch gesture by clearing the scratching flag.
- Parameters
-
| sender | The scratch button. |
- Ghidra address:
- 0x1af0ac
◆ touchEndScratch:
| - (void) touchEndScratch: |
|
(nullable id) | sender |
|
Ends a scratch gesture by clearing the scratching flag.
- Parameters
-
| sender | The scratch button. |
- Ghidra address:
- 0x1af09c
◆ updateView:
| - (void) updateView: |
|
(BOOL) | animated |
|
Refreshes the card from the challenge status table for its tag and resets the covers.
- Parameters
-
| animated | Whether to animate (unused; the covers are set directly). |
- Ghidra address:
- 0x1aeb60
- Ghidra address:
- 0x1aeb60
◆ aDelegate
The scratch delegate.
Held weakly.
- Ghidra address:
- 0x1b0310 (getter), 0x1b0330 (setter)
The documentation for this class was generated from the following files: