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

Lists downloadable campaign items and drives their unlock, download, and detail display. More...

#include <StoreCampaignViewController.h>

Inheritance diagram for StoreCampaignViewController:
Collaboration diagram for StoreCampaignViewController:

Instance Methods

(instancetype) - initWithParent:
 Builds the controller for a parent store view.
(void) - loadView
 Builds the view: a full-bounds vertical gradient, a non-selectable table, a loading overlay, and — on the pad only — a dimming cover and an in-place detail card.
(void) - downloadCampaignList
 Posts the campaign-list request and starts its Downloader .
(UITableViewCell *) - tableView:cellForRowAtIndexPath:
 Vends and lays out a banner row for a campaign item, installing cached artwork when ready.
(NSInteger) - tableView:numberOfRowsInSection:
 The number of campaign items.
(void) - tableView:willDisplayCell:forRowAtIndexPath:
 Clears each cell's background before display.
(NSInteger) - numberOfSectionsInTableView:
 Always one section.
(CGFloat) - tableView:heightForRowAtIndexPath:
 The row height for the device idiom.
(void) - handleTapCoverView:
 Pad cover-view tap: fades out the detail card and cover, then tears them down.
(void) - pushExternalLink:
 Opens the campaign banner's external link for a tapped cell.
(void) - selectItem:
 Opens the detail for a row: pushes a CampaignDetailViewController on the phone or fades in the in-place card on the pad.
(void) - pushCellButton:
 Cell-button tap: on the pad, fades in the in-place detail card for the tapped row.
(void) - moveExternalLink
 Opens the working row's external link.
(void) - itemDownload
 Starts the download flow for the working item, branching on its button type.
(void) - displayTerm:
 Shows the "unlock terms" informational alert.
(void) - displayUpdateAlert
 Shows the "an app update is required to unlock this tune" alert.
(void) - alertSelect:
 Alert-button handler: on the serial-code alert, posts a serial check; on the update alert, opens the App Store page.
(void) - downloaderFinished:
 Downloader completion: dispatches by the finished request (campaign list, item info, serial check, or marker data) and advances the unlock/download flow.
(void) - downloaderError:
 Downloader failure: shows the appropriate error alert and clears the request.
(void) - storeDialogCancel:
 The modal dialog's abort button was pressed: cancel the info fetch and pack download, then dismiss.
(void) - downloadManagerStartTask:
 A pack download task started: set the dialog's message.
(void) - downloadManagerCompleted:
 The pack download completed: re-evaluate the item, dismiss the dialog, and refresh.
(void) - downloadManagerFailed:
 The pack download failed: show an error alert, refresh, and dismiss.
(void) - downloadManagerProceed:
 A download task made progress: drive the dialog's progress bar from the marker or pack download depending on the item type.
(void) - storeClose
 Closes any open alert.
(void) - reloadUnlockList
 Rebuilds the unlock table and refreshes the music list.
(nullable UIImage *) - getArtwork:
 The cached artwork for a campaign item, queuing a background download when it is missing.
(void) - refreshMusicList
 Ensures every item's artwork is fetched, then reloads the table.
(void) - refreshUnlockTable
 Rebuilds the displayed item list from the server unlock-check list, deduplicating by campaign and honouring the hide flag, then updates the badge and opens any pending start-up item.
(void) - refreshUnlockBadge
 Recomputes the tab badge count from the newly-unlocked items.
(void) - setBadgeCnt:
 Sets the tab-bar badge to a count, clearing it when zero or negative.
(void) - didReceiveMemoryWarning
 Chains to super; the override adds nothing of its own.
(void) - viewDidLoad
 Makes the navigation bar and its subviews exclusive-touch.
(void) - viewDidUnload
 Drops the table view reference when the view is unloaded.
(void) - viewWillAppear:
 The view is about to appear.
(void) - viewDidAppear:
 The view has appeared.
(void) - viewWillDisappear:
 The view is about to disappear.
(void) - viewDidDisappear:
 The view has disappeared.
(BOOL) - shouldAutorotateToInterfaceOrientation:
 Whether the screen may rotate to an orientation.
(UIInterfaceOrientationMask) - supportedInterfaceOrientations
 The orientations the screen supports.
(BOOL) - shouldAutorotate
 Whether the screen rotates.
(void) - clearArtworkCache
 Empties the artwork cache, cancels every pending download operation, and clears the in-flight list.
(void) - downloadImageSync:
 Background operation body: downloads one campaign banner, rescales it for the screen, caches it, and applies it to any visible cell.
(void) - itemInfoDownload
 Posts the per-item info request for the working item and starts its Downloader .
(void) - itemUpdate
 Re-evaluates the working item and forwards its new state to the open detail card.
(void) - itemDeselect
 Clears the working row and the detail-open flag.
(void) - dealloc
 Empties the artwork cache and detaches its delegate.
(void) - initialCampaignID:
 Records a campaign ID to open automatically once the list loads.
(void) - addOpenDetail:
 Opens the detail for a campaign by ID: selects it if nothing is open, otherwise swaps the open card to it.
Instance Methods inherited from <DownloaderDelegate>
(void) - downloaderProceed:
 Sent periodically as data arrives, and once more on completion.
Instance Methods inherited from <StoreDownloadManagerDelegate>
(void) - downloadManagerStartTask:
 A task has started.
(void) - downloadManagerProceed:
 The current task made progress.
(void) - downloadManagerCompleted:
 All tasks completed.
(void) - downloadManagerFailed:
 A task failed.
Instance Methods inherited from <AlertViewManagerDelegate>
(void) - alertSelect:
 Sent when the user taps a button in an alert built with makeAlert:.
(void) - alertClose:
 Sent when a UIAlertController -based alert finishes dismissing.

Detailed Description

Lists downloadable campaign items and drives their unlock, download, and detail display.

Method Documentation

◆ addOpenDetail:

- (void) addOpenDetail: (NSInteger) campaignID

Opens the detail for a campaign by ID: selects it if nothing is open, otherwise swaps the open card to it.

Parameters
campaignIDThe campaign to open.
Ghidra address:
0xc4a2c
Ghidra address:
0xc4a2c

◆ alertSelect:

- (void) alertSelect: (NSDictionary *) info

Alert-button handler: on the serial-code alert, posts a serial check; on the update alert, opens the App Store page.

Parameters
infoThe alert-result dictionary.
Ghidra address:
0xc0c4c
Ghidra address:
0xc0c4c

◆ clearArtworkCache

- (void) clearArtworkCache

Empties the artwork cache, cancels every pending download operation, and clears the in-flight list.

Ghidra address:
0xc3cb4

◆ dealloc

- (void) dealloc

Empties the artwork cache and detaches its delegate.

Ghidra address:
0xc49b0

◆ didReceiveMemoryWarning

- (void) didReceiveMemoryWarning

Chains to super; the override adds nothing of its own.

Ghidra address:
0xc388c

◆ displayTerm:

- (void) displayTerm: (nullable id) sender

Shows the "unlock terms" informational alert.

Parameters
senderThe button that requested it.
Ghidra address:
0xc0a04

◆ displayUpdateAlert

- (void) displayUpdateAlert

Shows the "an app update is required to unlock this tune" alert.

Ghidra address:
0xc0ae8

◆ downloadCampaignList

- (void) downloadCampaignList

Posts the campaign-list request and starts its Downloader .

Ghidra address:
0xbf074

◆ downloaderError:

- (void) downloaderError: (id) downloader

Downloader failure: shows the appropriate error alert and clears the request.

Parameters
downloaderThe failed request.
Ghidra address:
0xc22ec
Ghidra address:
0xc22ec

Reimplemented from <DownloaderDelegate>.

◆ downloaderFinished:

- (void) downloaderFinished: (id) downloader

Downloader completion: dispatches by the finished request (campaign list, item info, serial check, or marker data) and advances the unlock/download flow.

Parameters
downloaderThe finished request.
Ghidra address:
0xc1094
Ghidra address:
0xc1094

Reimplemented from <DownloaderDelegate>.

◆ downloadImageSync:

- (void) downloadImageSync: (nullable NSArray *) arguments

Background operation body: downloads one campaign banner, rescales it for the screen, caches it, and applies it to any visible cell.

Parameters
argumentsA two-element array of the banner NSURL and the campaign-ID NSNumber .
Ghidra address:
0xc3d14

◆ downloadManagerCompleted:

- (void) downloadManagerCompleted: (StoreDownloadManager *) manager

The pack download completed: re-evaluate the item, dismiss the dialog, and refresh.

Parameters
managerThe download manager.
Ghidra address:
0xc2ae4
Ghidra address:
0xc2ae4

◆ downloadManagerFailed:

- (void) downloadManagerFailed: (StoreDownloadManager *) manager

The pack download failed: show an error alert, refresh, and dismiss.

Parameters
managerThe download manager.
Ghidra address:
0xc2b94
Ghidra address:
0xc2b94

◆ downloadManagerProceed:

- (void) downloadManagerProceed: (StoreDownloadManager *) manager

A download task made progress: drive the dialog's progress bar from the marker or pack download depending on the item type.

Parameters
managerThe download manager.
Ghidra address:
0xc2d7c
Ghidra address:
0xc2d7c

◆ downloadManagerStartTask:

- (void) downloadManagerStartTask: (StoreDownloadManager *) manager

A pack download task started: set the dialog's message.

Parameters
managerThe download manager.
Ghidra address:
0xc28cc
Ghidra address:
0xc28cc

◆ getArtwork:

- (nullable UIImage *) getArtwork: (nullable id) info

The cached artwork for a campaign item, queuing a background download when it is missing.

Parameters
infoThe campaign item.
Returns
The cached image, or nil while it downloads.
Ghidra address:
0xc2f28

◆ handleTapCoverView:

- (void) handleTapCoverView: (nullable UITapGestureRecognizer *) recognizer

Pad cover-view tap: fades out the detail card and cover, then tears them down.

Parameters
recognizerThe tap gesture recogniser.
Ghidra address:
0xbf82c

◆ initialCampaignID:

- (void) initialCampaignID: (NSInteger) campaignID

Records a campaign ID to open automatically once the list loads.

Parameters
campaignIDThe campaign to open, or -1 for none.
Ghidra address:
0xc4a1c
Ghidra address:
0xc4a1c

◆ initWithParent:

- (instancetype) initWithParent: (nullable id< StoreParentViewController >) parent

Builds the controller for a parent store view.

Sets the navigation and tab-bar titles, loads the tab image, installs a back button targeting the parent, caches the device idiom, creates the artwork cache, operation queue, and download-tracking list, and kicks off the campaign-list download.

Parameters
parentThe owning StoreViewController ; held weakly.
Returns
The initialised controller.
Ghidra address:
0xbe580

◆ itemDeselect

- (void) itemDeselect

Clears the working row and the detail-open flag.

Ghidra address:
0xc4990

◆ itemDownload

- (void) itemDownload

Starts the download flow for the working item, branching on its button type.

Ghidra address:
0xc06f0

◆ itemInfoDownload

- (void) itemInfoDownload

Posts the per-item info request for the working item and starts its Downloader .

Ghidra address:
0xc45ec

◆ itemUpdate

- (void) itemUpdate

Re-evaluates the working item and forwards its new state to the open detail card.

Ghidra address:
0xc48d8

◆ loadView

- (void) loadView

Builds the view: a full-bounds vertical gradient, a non-selectable table, a loading overlay, and — on the pad only — a dimming cover and an in-place detail card.

Ghidra address:
0xbe8ec

◆ moveExternalLink

- (void) moveExternalLink

Opens the working row's external link.

Ghidra address:
0xc060c

◆ numberOfSectionsInTableView:

- (NSInteger) numberOfSectionsInTableView: (UITableView *) aTableView

Always one section.

Parameters
aTableViewThe table asking.
Returns
Always 1.
Ghidra address:
0xbf800
Ghidra address:
0xbf800

◆ pushCellButton:

- (void) pushCellButton: (nullable id) sender

Cell-button tap: on the pad, fades in the in-place detail card for the tapped row.

Parameters
senderThe cell's button, whose tag is the row index.
Ghidra address:
0xc0230

◆ pushExternalLink:

- (void) pushExternalLink: (nullable id) sender

Opens the campaign banner's external link for a tapped cell.

Parameters
senderThe cell's button, whose tag is the row index.
Ghidra address:
0xbfc60

◆ refreshMusicList

- (void) refreshMusicList

Ensures every item's artwork is fetched, then reloads the table.

Ghidra address:
0xc3168

◆ refreshUnlockBadge

- (void) refreshUnlockBadge

Recomputes the tab badge count from the newly-unlocked items.

Ghidra address:
0xc369c

◆ refreshUnlockTable

- (void) refreshUnlockTable

Rebuilds the displayed item list from the server unlock-check list, deduplicating by campaign and honouring the hide flag, then updates the badge and opens any pending start-up item.

Ghidra address:
0xc325c

◆ reloadUnlockList

- (void) reloadUnlockList

Rebuilds the unlock table and refreshes the music list.

Ghidra address:
0xc2ef4

◆ selectItem:

- (void) selectItem: (int) index

Opens the detail for a row: pushes a CampaignDetailViewController on the phone or fades in the in-place card on the pad.

Parameters
indexThe row index.
Ghidra address:
0xbfd60
Ghidra address:
0xbfd60
Ghidra address:
0xc015c
Ghidra address:
0xc022c

◆ setBadgeCnt:

- (void) setBadgeCnt: (int) count

Sets the tab-bar badge to a count, clearing it when zero or negative.

Parameters
countThe badge count.
Ghidra address:
0xc37e4
Ghidra address:
0xc37e4

◆ shouldAutorotate

- (BOOL) shouldAutorotate

Whether the screen rotates.

Returns
Always YES.
Ghidra address:
0xc3cac
Ghidra address:
0xc3cac

◆ shouldAutorotateToInterfaceOrientation:

- (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation

Whether the screen may rotate to an orientation.

Parameters
interfaceOrientationThe orientation asked about.
Returns
YES for the two portrait orientations, NO otherwise.
Ghidra address:
0xc3c94
Ghidra address:
0xc3c94

◆ storeClose

- (void) storeClose

Closes any open alert.

Ghidra address:
0xc2eac

◆ storeDialogCancel:

- (void) storeDialogCancel: (id) dialogView

The modal dialog's abort button was pressed: cancel the info fetch and pack download, then dismiss.

Parameters
dialogViewThe dialog.
Ghidra address:
0xc27cc
Ghidra address:
0xc27cc

Reimplemented from <StoreDialogViewDelegate>.

◆ supportedInterfaceOrientations

- (UIInterfaceOrientationMask) supportedInterfaceOrientations

The orientations the screen supports.

Returns
Both portrait orientations.
Ghidra address:
0xc3ca4
Ghidra address:
0xc3ca4

◆ tableView:cellForRowAtIndexPath:

- (UITableViewCell *) tableView: (UITableView *) aTableView
cellForRowAtIndexPath: (NSIndexPath *) indexPath 

Vends and lays out a banner row for a campaign item, installing cached artwork when ready.

Parameters
aTableViewThe table asking.
indexPathThe row's index path.
Returns
The banner cell for the campaign item.
Ghidra address:
0xbf344
Ghidra address:
0xbf344
Ghidra address:
0xbf720
Ghidra address:
0xbf76c

◆ tableView:heightForRowAtIndexPath:

- (CGFloat) tableView: (UITableView *) aTableView
heightForRowAtIndexPath: (NSIndexPath *) indexPath 

The row height for the device idiom.

Parameters
aTableViewThe table asking.
indexPathThe row's index path.
Returns
The campaign cell height for the current idiom.
Ghidra address:
0xbf808
Ghidra address:
0xbf808

◆ tableView:numberOfRowsInSection:

- (NSInteger) tableView: (UITableView *) aTableView
numberOfRowsInSection: (NSInteger) section 

The number of campaign items.

Parameters
aTableViewThe table asking.
sectionThe section asked about.
Returns
The campaign-item count, or 0 before the list has been fetched.
Ghidra address:
0xbf770
Ghidra address:
0xbf770

◆ tableView:willDisplayCell:forRowAtIndexPath:

- (void) tableView: (UITableView *) aTableView
willDisplayCell: (UITableViewCell *) cell
forRowAtIndexPath: (NSIndexPath *) indexPath 

Clears each cell's background before display.

Parameters
aTableViewThe table asking.
cellThe cell about to be drawn.
indexPathThe row's index path.
Ghidra address:
0xbf790
Ghidra address:
0xbf790

◆ viewDidAppear:

- (void) viewDidAppear: (BOOL) animated

The view has appeared.

Parameters
animatedWhether the appearance was animated.
Ghidra address:
0xc3b78
Ghidra address:
0xc3b78

◆ viewDidDisappear:

- (void) viewDidDisappear: (BOOL) animated

The view has disappeared.

Parameters
animatedWhether the disappearance was animated.
Ghidra address:
0xc3c5c
Ghidra address:
0xc3c5c

◆ viewDidLoad

- (void) viewDidLoad

Makes the navigation bar and its subviews exclusive-touch.

Ghidra address:
0xc38c4

◆ viewDidUnload

- (void) viewDidUnload

Drops the table view reference when the view is unloaded.

Ghidra address:
0xc3aa4

◆ viewWillAppear:

- (void) viewWillAppear: (BOOL) animated

The view is about to appear.

Parameters
animatedWhether the appearance is animated.
Ghidra address:
0xc3afc
Ghidra address:
0xc3afc

◆ viewWillDisappear:

- (void) viewWillDisappear: (BOOL) animated

The view is about to disappear.

Parameters
animatedWhether the disappearance is animated.
Ghidra address:
0xc3bd4
Ghidra address:
0xc3bd4

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