A CAGradientLayer -backed licence-agreement sheet.
More...
#include <LicenseAgreementView.h>
|
| (Class) | + layerClass |
| | The layer class, so the view is backed by a CAGradientLayer .
|
A CAGradientLayer -backed licence-agreement sheet.
Downloads the current licence date and message (through jubeatLabAccess , a Downloader , or a SessionDownloader depending on the preference key), presents the licence text in a scrollable UITextView with Agree and Disagree buttons, and records the agreed date against the key in NSUserDefaults . The Agree button becomes enabled only once the user scrolls the policy text to the bottom.
◆ checkLicenseUpdate:currentDate:
| - (BOOL) checkLicenseUpdate: |
|
(nullable NSString *) | agreedDate |
| currentDate: |
|
(nullable NSString *) | currentDate |
Reports whether the licence stored under the key predates the downloaded current date.
- Parameters
-
| agreedDate | The date last agreed to, or nil when nothing has been agreed. |
| currentDate | The current licence date from the server. |
- Returns
YES when no date has been agreed or the agreed date is earlier than currentDate .
- Ghidra address:
- 0x1f64c8
◆ createLicenseBoard:
| - (void) createLicenseBoard: |
|
(nullable NSString *) | message |
|
Builds the gradient board, heading, scrollable policy text, and the two buttons.
- Parameters
-
| message | The licence policy text. |
- Ghidra address:
- 0x1f6604
◆ displayMessage:
| - (void) displayMessage: |
|
(nullable NSString *) | message |
|
Empty in the shipped binary.
- Parameters
-
| message | The message that would be displayed. |
- Ghidra address:
- 0x1f6600
◆ downloaderError:
| - (void) downloaderError: |
|
(nullable id) | downloader |
|
Downloader callback for a failed download; reports the error to the delegate.
- Parameters
-
| downloader | The download that failed. |
- Ghidra address:
- 0x1f64b4
◆ downloaderFinished:
| - (void) downloaderFinished: |
|
(nullable id) | downloader |
|
Downloader callback for a finished download; parses the store or challenge response.
- Parameters
-
| downloader | The download that finished. |
- Ghidra address:
- 0x1f5cd0
◆ downloaderProceed:
| - (void) downloaderProceed: |
|
(nullable id) | downloader |
|
Downloader callback for download progress.
Empty in the shipped binary.
- Parameters
-
| downloader | The download in progress. |
- Ghidra address:
- 0x1f64c4
◆ enablePadScale:
| - (BOOL) enablePadScale: |
|
(nullable NSString *) | key |
|
Reports whether the given key participates in the pad-scaled layout.
- Parameters
-
- Returns
YES for the title, store, and challenge licence keys.
- Ghidra address:
- 0x1f51ec
◆ init:keyString:
| - (instancetype) init: |
|
(nullable id) | delegate |
| keyString: |
|
(nullable NSString *) | keyString |
Designated initialiser: builds the board and starts the licence-date download.
Stores delegate weakly and keyString as the defaults key, defaults the pad scale to 1.0 (raising it to 1.5 when running on a pad and the key is pad-scaled), then dispatches on the key: PrefAgreeLicenseVersion starts a jubeatLabAccess licence-version download; PrefTitleAgreeLicenseVersion compares the stored agreed date against the app delegate's current licence date and either notifies the delegate or builds the board; PrefStoreAgreeLicenseVersion starts a store-policy Downloader ; and PrefAgreeChallengePolicyVersion starts a challenge-policy SessionDownloader .
- Parameters
-
| delegate | The object notified of the agreement outcome. Held weakly. |
| keyString | The NSUserDefaults key recording the agreed licence date. |
- Returns
- The initialised view.
- Ghidra address:
- 0x1f528c
◆ jubeatLabAccessError:
| - (void) jubeatLabAccessError: |
|
(nullable id) | access |
|
jubeatLabAccess callback for a failed download; reports the error to the delegate.
- Parameters
-
| access | The licence-access client. |
- Ghidra address:
- 0x1f59d4
◆ jubeatLabAccessFinished:
| - (void) jubeatLabAccessFinished: |
|
(nullable id) | access |
|
jubeatLabAccess callback for a finished download; parses the response and drives the flow.
- Parameters
-
| access | The licence-access client. |
- Ghidra address:
- 0x1f59e4
◆ jubeatLabAccessProceed:
| - (void) jubeatLabAccessProceed: |
|
(nullable id) | access |
|
jubeatLabAccess callback for download progress.
Empty in the shipped binary.
- Parameters
-
| access | The licence-access client. |
- Ghidra address:
- 0x1f59d0
◆ layerClass
The layer class, so the view is backed by a CAGradientLayer .
- Returns
- The
CAGradientLayer class.
- Ghidra address:
- 0x1f5278
- Ghidra address:
- 0x1f5278
◆ pushAgree:
| - (void) pushAgree: |
|
(nullable id) | sender |
|
Persists the agreed date and fades the board out, then notifies the delegate.
- Parameters
-
- Ghidra address:
- 0x1f76c4
◆ pushDisAgree:
| - (void) pushDisAgree: |
|
(nullable id) | sender |
|
Notifies the delegate that the user declined.
- Parameters
-
| sender | The Disagree button. |
- Ghidra address:
- 0x1f78b0
◆ scrollViewDidEndDragging:willDecelerate:
| - (void) scrollViewDidEndDragging: |
|
(UIScrollView *) | scrollView |
| willDecelerate: |
|
(BOOL) | decelerate |
Enables the Agree button when dragging ends at the bottom of the policy text.
- Parameters
-
| scrollView | The scrolling licence text view. |
| decelerate | Whether scrolling will continue to decelerate. |
- Ghidra address:
- 0x1f75e0
- Ghidra address:
- 0x1f75e0
◆ scrollViewDidScroll:
| - (void) scrollViewDidScroll: |
|
(UIScrollView *) | scrollView |
|
Enables the Agree button once the policy text is scrolled to the bottom.
- Parameters
-
| scrollView | The scrolling licence text view. |
- Ghidra address:
- 0x1f74fc
- Ghidra address:
- 0x1f74fc
◆ sendErrorDelegate:
| - (void) sendErrorDelegate: |
|
(nullable NSString *) | msgStr |
|
Routes a download error message to the delegate's agreementError:msgStr: .
- Parameters
-
| msgStr | The error message, or nil. |
- Ghidra address:
- 0x1f5928
◆ weakCoverView
| - (UIView*) weakCoverView |
|
readwritenonatomicweak |
The view that is dimmed behind the sheet.
- Ghidra address:
- 0x1f7954 (getter), 0x1f7974 (setter).
The documentation for this class was generated from the following files: