A paging carousel of promotion banners with auto-advance and per-banner sample playback.
More...
#include <StorePromotionView.h>
|
| (instancetype) | - initWithFrame:promotions: |
| | Builds the carousel from a list of promotions and lays out every banner.
|
| (void) | - setSampleButtonImage |
| | Updates the sample button's image and the track label's opacity for the current mode.
|
| (nullable UIView *) | - hitTest:withEvent: |
| | Redirects a touch that lands on the view itself down to the scroll view.
|
| (void) | - beginLoop |
| | Arms the auto-advance timer and plays the centred banner's thumbnail.
|
| (void) | - start |
| | Starts fetching every banner's artwork, then begins the auto-advance loop.
|
| (void) | - pause |
| | Pauses the carousel: stops the timer and the thumbnail playback.
|
| (void) | - resume |
| | Resumes a paused carousel.
|
| (void) | - stop |
| | Stops the carousel: invalidates the timer and mutes the thumbnail.
|
| (void) | - nextBanner |
| | Scrolls to the next banner and plays its thumbnail.
|
| (void) | - bannerTapped: |
| | Handles a banner tap, reporting the pack or genre to the delegate.
|
| (void) | - tapSampleBtn: |
| | Toggles the sample-play mode, persists it, and refreshes the button.
|
| (void) | - scrollViewWillBeginDragging: |
| | Cancels the auto-advance timer while the user drags.
|
| (void) | - scrollViewDidScroll: |
| | Teleports the offset across the wrap-around seam to fake an infinite strip.
|
| (void) | - scrollViewDidEndDragging:willDecelerate: |
| | Empty in the binary.
|
| (void) | - scrollViewWillBeginDecelerating: |
| | Empty in the binary.
|
| (void) | - scrollViewDidEndDecelerating: |
| | Re-arms the auto-advance timer once a decelerating scroll settles.
|
| (void) | - playBannerThumbnail: |
| | Plays the thumbnail of the banner at index, updating the track label.
|
| (void) | - thumbnailMute: |
| | Enables or disables thumbnail playback, playing or muting the centred banner.
|
| (nullable NSData *) | - getThumbnailData: |
| | Returns a promotion's cached thumbnail data, enqueuing a download on a miss.
|
| (void) | - clearThumbnailCache |
| | Empties the thumbnail cache and cancels all pending downloads.
|
| (void) | - downloadImageSync: |
| | Downloads one thumbnail on the operation queue and caches its bytes.
|
| (void) | - playThumbnail:data: |
| | Loads and plays a thumbnail's sound clip through the audio manager.
|
| (void) | - stopThumbnail |
| | Fades out and clears the currently-playing thumbnail clip.
|
A paging carousel of promotion banners with auto-advance and per-banner sample playback.
◆ bannerTapped:
| - (void) bannerTapped: |
|
(nonnull UITapGestureRecognizer *) | recognizer |
|
Handles a banner tap, reporting the pack or genre to the delegate.
- Parameters
-
| recognizer | The tap gesture recogniser. |
- Ghidra address:
- 0x1bc710
◆ beginLoop
Arms the auto-advance timer and plays the centred banner's thumbnail.
- Ghidra address:
- 0x1bc314
◆ clearThumbnailCache
| - (void) clearThumbnailCache |
|
|
|
Empties the thumbnail cache and cancels all pending downloads.
- Ghidra address:
- 0x1bcf54
◆ downloadImageSync:
| - (void) downloadImageSync: |
|
(nonnull NSArray *) | args |
|
Downloads one thumbnail on the operation queue and caches its bytes.
- Parameters
-
| args | A two-element array of the NSURL and its cache key (the sample name). |
- Ghidra address:
- 0x1bcfb4
◆ getThumbnailData:
| - (nullable NSData *) getThumbnailData: |
|
(nullable StorePromotion *) | promotion |
|
Returns a promotion's cached thumbnail data, enqueuing a download on a miss.
- Parameters
-
| promotion | The promotion whose sample thumbnail is wanted. |
- Returns
- The cached bytes, or nil while a download is in flight or none is possible.
- Ghidra address:
- 0x1bcd48
◆ hitTest:withEvent:
| - (nullable UIView *) hitTest: |
|
(CGPoint) | point |
| withEvent: |
|
(nullable UIEvent *) | event |
Redirects a touch that lands on the view itself down to the scroll view.
- Parameters
-
| point | The touch point. |
| event | The touch event. |
- Returns
- The hit view, or the scroll view when the view itself was hit.
- Ghidra address:
- 0x1bc294
◆ initWithFrame:promotions:
| - (instancetype) initWithFrame: |
|
(CGRect) | frame |
| promotions: |
|
(nullable NSArray *) | promotions |
Builds the carousel from a list of promotions and lays out every banner.
- Parameters
-
| frame | The view's frame. |
| promotions | The promotions to show, each a StorePromotion . |
- Returns
- The initialised view.
- Ghidra address:
- 0x1bb4a8
◆ nextBanner
Scrolls to the next banner and plays its thumbnail.
The timer's action.
- Ghidra address:
- 0x1bc690
- Ghidra address:
- 0x1bc690
◆ pause
Pauses the carousel: stops the timer and the thumbnail playback.
- Ghidra address:
- 0x1bc55c
◆ playBannerThumbnail:
| - (void) playBannerThumbnail: |
|
(int) | index |
|
Plays the thumbnail of the banner at index, updating the track label.
- Parameters
-
| index | The banner index, taken modulo the banner count internally by the geometry. |
- Ghidra address:
- 0x1bcb34
- Ghidra address:
- 0x1bcb34
◆ playThumbnail:data:
| - (void) playThumbnail: |
|
(nullable NSString *) | name |
| data: |
|
(nullable NSData *) | data |
Loads and plays a thumbnail's sound clip through the audio manager.
- Parameters
-
| name | The sample name, used as the currently-playing latch. |
| data | The clip bytes. |
- Ghidra address:
- 0x1bd3c8
◆ resume
Resumes a paused carousel.
- Ghidra address:
- 0x1bc600
◆ scrollViewDidEndDecelerating:
| - (void) scrollViewDidEndDecelerating: |
|
(nonnull UIScrollView *) | scrollView |
|
Re-arms the auto-advance timer once a decelerating scroll settles.
- Parameters
-
| scrollView | The scroll view. |
- Ghidra address:
- 0x1bcab4
◆ scrollViewDidEndDragging:willDecelerate:
| - (void) scrollViewDidEndDragging: |
|
(nonnull UIScrollView *) | scrollView |
| willDecelerate: |
|
(BOOL) | decelerate |
Empty in the binary.
- Parameters
-
| scrollView | The scroll view. |
| decelerate | Whether the scroll view will decelerate. |
- Ghidra address:
- 0x1bcaac
◆ scrollViewDidScroll:
| - (void) scrollViewDidScroll: |
|
(nonnull UIScrollView *) | scrollView |
|
Teleports the offset across the wrap-around seam to fake an infinite strip.
- Parameters
-
| scrollView | The scroll view. |
- Ghidra address:
- 0x1bc9f0
◆ scrollViewWillBeginDecelerating:
| - (void) scrollViewWillBeginDecelerating: |
|
(nonnull UIScrollView *) | scrollView |
|
Empty in the binary.
- Parameters
-
| scrollView | The scroll view. |
- Ghidra address:
- 0x1bcab0
◆ scrollViewWillBeginDragging:
| - (void) scrollViewWillBeginDragging: |
|
(nonnull UIScrollView *) | scrollView |
|
Cancels the auto-advance timer while the user drags.
- Parameters
-
| scrollView | The scroll view. |
- Ghidra address:
- 0x1bc990
◆ setSampleButtonImage
| - (void) setSampleButtonImage |
|
|
|
Updates the sample button's image and the track label's opacity for the current mode.
- Ghidra address:
- 0x1bc204
◆ start
Starts fetching every banner's artwork, then begins the auto-advance loop.
- Ghidra address:
- 0x1bc418
◆ stop
Stops the carousel: invalidates the timer and mutes the thumbnail.
- Ghidra address:
- 0x1bc624
◆ stopThumbnail
Fades out and clears the currently-playing thumbnail clip.
- Ghidra address:
- 0x1bd534
◆ tapSampleBtn:
| - (void) tapSampleBtn: |
|
(nullable id) | sender |
|
Toggles the sample-play mode, persists it, and refreshes the button.
- Parameters
-
- Ghidra address:
- 0x1bc8b8
◆ thumbnailMute:
| - (void) thumbnailMute: |
|
(BOOL) | mute |
|
Enables or disables thumbnail playback, playing or muting the centred banner.
- Parameters
-
| mute | Whether playback should be active (subject to the sample-play mode). |
- Ghidra address:
- 0x1bcc98
- Ghidra address:
- 0x1bcc98
◆ delegate
The tap-selection delegate.
- Ghidra address:
- 0x1bd5d0 (getter), 0x1bd5f0 (setter)
The documentation for this class was generated from the following files: