JubeatPlus 3.9.11
Loading...
Searching...
No Matches
StorePromotionView Class Reference

A paging carousel of promotion banners with auto-advance and per-banner sample playback. More...

#include <StorePromotionView.h>

Inheritance diagram for StorePromotionView:
Collaboration diagram for StorePromotionView:

Instance Methods

(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.

Properties

id< StorePromotionViewDelegate > delegate
 The tap-selection delegate.

Detailed Description

A paging carousel of promotion banners with auto-advance and per-banner sample playback.

Method Documentation

◆ bannerTapped:

- (void) bannerTapped: (nonnull UITapGestureRecognizer *) recognizer

Handles a banner tap, reporting the pack or genre to the delegate.

Parameters
recognizerThe tap gesture recogniser.
Ghidra address:
0x1bc710

◆ beginLoop

- (void) 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
argsA 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
promotionThe 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
pointThe touch point.
eventThe 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
frameThe view's frame.
promotionsThe promotions to show, each a StorePromotion .
Returns
The initialised view.
Ghidra address:
0x1bb4a8

◆ nextBanner

- (void) nextBanner

Scrolls to the next banner and plays its thumbnail.

The timer's action.

Ghidra address:
0x1bc690
Ghidra address:
0x1bc690

◆ pause

- (void) 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
indexThe 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
nameThe sample name, used as the currently-playing latch.
dataThe clip bytes.
Ghidra address:
0x1bd3c8

◆ resume

- (void) 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
scrollViewThe scroll view.
Ghidra address:
0x1bcab4

◆ scrollViewDidEndDragging:willDecelerate:

- (void) scrollViewDidEndDragging: (nonnull UIScrollView *) scrollView
willDecelerate: (BOOL) decelerate 

Empty in the binary.

Parameters
scrollViewThe scroll view.
decelerateWhether 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
scrollViewThe scroll view.
Ghidra address:
0x1bc9f0

◆ scrollViewWillBeginDecelerating:

- (void) scrollViewWillBeginDecelerating: (nonnull UIScrollView *) scrollView

Empty in the binary.

Parameters
scrollViewThe scroll view.
Ghidra address:
0x1bcab0

◆ scrollViewWillBeginDragging:

- (void) scrollViewWillBeginDragging: (nonnull UIScrollView *) scrollView

Cancels the auto-advance timer while the user drags.

Parameters
scrollViewThe 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

- (void) start

Starts fetching every banner's artwork, then begins the auto-advance loop.

Ghidra address:
0x1bc418

◆ stop

- (void) stop

Stops the carousel: invalidates the timer and mutes the thumbnail.

Ghidra address:
0x1bc624

◆ stopThumbnail

- (void) 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
senderThe sample button.
Ghidra address:
0x1bc8b8

◆ thumbnailMute:

- (void) thumbnailMute: (BOOL) mute

Enables or disables thumbnail playback, playing or muting the centred banner.

Parameters
muteWhether playback should be active (subject to the sample-play mode).
Ghidra address:
0x1bcc98
Ghidra address:
0x1bcc98

Property Documentation

◆ delegate

- (id<StorePromotionViewDelegate>) delegate
readwritenonatomicweak

The tap-selection delegate.

Ghidra address:
0x1bd5d0 (getter), 0x1bd5f0 (setter)

The documentation for this class was generated from the following files: