|
JubeatPlus 3.9.11
|
Lists downloadable campaign items and drives their unlock, download, and detail display. More...
#include <StoreCampaignViewController.h>


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. | |
Lists downloadable campaign items and drives their unlock, download, and detail display.
| - (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.
| campaignID | The campaign to open. |
| - (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.
| info | The alert-result dictionary. |
| - (void) clearArtworkCache |
Empties the artwork cache, cancels every pending download operation, and clears the in-flight list.
| - (void) dealloc |
Empties the artwork cache and detaches its delegate.
| - (void) didReceiveMemoryWarning |
Chains to super; the override adds nothing of its own.
| - (void) displayTerm: | (nullable id) | sender |
Shows the "unlock terms" informational alert.
| sender | The button that requested it. |
| - (void) displayUpdateAlert |
Shows the "an app update is required to unlock this tune" alert.
| - (void) downloadCampaignList |
Posts the campaign-list request and starts its Downloader .
| - (void) downloaderError: | (id) | downloader |
Downloader failure: shows the appropriate error alert and clears the request.
| downloader | The failed request. |
Reimplemented from <DownloaderDelegate>.
| - (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.
| downloader | The finished request. |
Reimplemented from <DownloaderDelegate>.
| - (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.
| arguments | A two-element array of the banner NSURL and the campaign-ID NSNumber . |
| - (void) downloadManagerCompleted: | (StoreDownloadManager *) | manager |
The pack download completed: re-evaluate the item, dismiss the dialog, and refresh.
| manager | The download manager. |
| - (void) downloadManagerFailed: | (StoreDownloadManager *) | manager |
The pack download failed: show an error alert, refresh, and dismiss.
| manager | The download manager. |
| - (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.
| manager | The download manager. |
| - (void) downloadManagerStartTask: | (StoreDownloadManager *) | manager |
A pack download task started: set the dialog's message.
| manager | The download manager. |
| - (nullable UIImage *) getArtwork: | (nullable id) | info |
The cached artwork for a campaign item, queuing a background download when it is missing.
| info | The campaign item. |
| - (void) handleTapCoverView: | (nullable UITapGestureRecognizer *) | recognizer |
Pad cover-view tap: fades out the detail card and cover, then tears them down.
| recognizer | The tap gesture recogniser. |
| - (void) initialCampaignID: | (NSInteger) | campaignID |
Records a campaign ID to open automatically once the list loads.
| campaignID | The campaign to open, or -1 for none. |
| - (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.
| parent | The owning StoreViewController ; held weakly. |
| - (void) itemDeselect |
Clears the working row and the detail-open flag.
| - (void) itemDownload |
Starts the download flow for the working item, branching on its button type.
| - (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) 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) moveExternalLink |
Opens the working row's external link.
| - (NSInteger) numberOfSectionsInTableView: | (UITableView *) | aTableView |
Always one section.
| aTableView | The table asking. |
| - (void) pushCellButton: | (nullable id) | sender |
Cell-button tap: on the pad, fades in the in-place detail card for the tapped row.
| sender | The cell's button, whose tag is the row index. |
| - (void) pushExternalLink: | (nullable id) | sender |
Opens the campaign banner's external link for a tapped cell.
| sender | The cell's button, whose tag is the row index. |
| - (void) refreshMusicList |
Ensures every item's artwork is fetched, then reloads the table.
| - (void) refreshUnlockBadge |
Recomputes the tab badge count from the newly-unlocked items.
| - (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) reloadUnlockList |
Rebuilds the unlock table and refreshes the music list.
| - (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.
| index | The row index. |
| - (void) setBadgeCnt: | (int) | count |
Sets the tab-bar badge to a count, clearing it when zero or negative.
| count | The badge count. |
| - (BOOL) shouldAutorotate |
Whether the screen rotates.
| - (BOOL) shouldAutorotateToInterfaceOrientation: | (UIInterfaceOrientation) | interfaceOrientation |
Whether the screen may rotate to an orientation.
| interfaceOrientation | The orientation asked about. |
| - (void) storeClose |
Closes any open alert.
| - (void) storeDialogCancel: | (id) | dialogView |
The modal dialog's abort button was pressed: cancel the info fetch and pack download, then dismiss.
| dialogView | The dialog. |
Reimplemented from <StoreDialogViewDelegate>.
| - (UIInterfaceOrientationMask) supportedInterfaceOrientations |
The orientations the screen supports.
| - (UITableViewCell *) tableView: | (UITableView *) | aTableView | |
| cellForRowAtIndexPath: | (NSIndexPath *) | indexPath |
Vends and lays out a banner row for a campaign item, installing cached artwork when ready.
| aTableView | The table asking. |
| indexPath | The row's index path. |
| - (CGFloat) tableView: | (UITableView *) | aTableView | |
| heightForRowAtIndexPath: | (NSIndexPath *) | indexPath |
The row height for the device idiom.
| aTableView | The table asking. |
| indexPath | The row's index path. |
| - (NSInteger) tableView: | (UITableView *) | aTableView | |
| numberOfRowsInSection: | (NSInteger) | section |
The number of campaign items.
| aTableView | The table asking. |
| section | The section asked about. |
| - (void) tableView: | (UITableView *) | aTableView | |
| willDisplayCell: | (UITableViewCell *) | cell | |
| forRowAtIndexPath: | (NSIndexPath *) | indexPath |
Clears each cell's background before display.
| aTableView | The table asking. |
| cell | The cell about to be drawn. |
| indexPath | The row's index path. |
| - (void) viewDidAppear: | (BOOL) | animated |
The view has appeared.
| animated | Whether the appearance was animated. |
| - (void) viewDidDisappear: | (BOOL) | animated |
The view has disappeared.
| animated | Whether the disappearance was animated. |
| - (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: | (BOOL) | animated |
The view is about to appear.
| animated | Whether the appearance is animated. |
| - (void) viewWillDisappear: | (BOOL) | animated |
The view is about to disappear.
| animated | Whether the disappearance is animated. |