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

A table view controller managing the user's music playlists. More...

#include <MusicPlaylistViewController.h>

Inheritance diagram for MusicPlaylistViewController:
Collaboration diagram for MusicPlaylistViewController:

Instance Methods

(instancetype) - initWithStyle:
 Builds the controller, its content size, and its navigation bar.
(CGFloat) - tableView:heightForFooterInSection:
 Height for a section's footer.
(nonnull UITableViewCell *) - tableView:cellForRowAtIndexPath:
 Builds a cell for a filter, level, or playlist row.
(NSInteger) - numberOfSectionsInTableView:
 Number of sections: three in Playlists mode, one otherwise.
(NSInteger) - tableView:numberOfRowsInSection:
 Number of rows in a section.
(void) - tableView:commitEditingStyle:forRowAtIndexPath:
 Deletes a playlist when its row is swiped.
(BOOL) - tableView:canEditRowAtIndexPath:
 Whether a row may be edited (swipe-deleted).
(nullable NSIndexPath *) - tableView:willSelectRowAtIndexPath:
 Blocks selection of an already-active row.
(void) - tableView:didSelectRowAtIndexPath:
 Routes a selection: a filter or playlist notifies the delegate, the level row pushes the level selector.
(void) - tableView:willDisplayCell:forRowAtIndexPath:
 Whitens a cell's background, tinting the level row when a level filter is active.
(void) - selectLevel:
 Persists the chosen level and tells the delegate the level filter was picked.
(void) - tapNewPlaylist:
 Pushes the create-playlist screen.
(void) - tapLevelSelect
 Empty action; the level filter is instead reached through row selection.
(void) - tapClose:
 Tells the delegate the screen should close.
(void) - musicPlaylistCreateWithName:
 Adds a playlist with the entered name, persists it, and reloads.
(void) - viewWillAppear:
 Chains up to super .
(void) - viewDidAppear:
 Chains up to super .
(void) - viewWillDisappear:
 Chains up to super .
(void) - viewDidDisappear:
 Chains up to super .
(void) - viewDidLoad
 Disables exclusive-touch propagation across the navigation bar's subviews.
(BOOL) - shouldAutorotateToInterfaceOrientation:
 Reports that only the two portrait orientations are supported.
(UIInterfaceOrientationMask) - supportedInterfaceOrientations
 The orientations the screen allows.
(BOOL) - shouldAutorotate
 Whether the screen rotates at all.

Properties

MusicPlaylistListMode listMode
 Which list layout the table shows.
NSUInteger selectedMusicID
 The music identifier the selections apply to.
id< MusicPlaylistViewControllerDelegate > delegate
 The object told about selections and close events.
MusicPlaylistManager * playlistManager
 The model backing the playlists list.
UIBarButtonItem * barBtnNew
 The right-hand "new playlist" bar button item.

Detailed Description

A table view controller managing the user's music playlists.

Method Documentation

◆ initWithStyle:

- (instancetype) initWithStyle: (UITableViewStyle) style

Builds the controller, its content size, and its navigation bar.

Sets a fixed preferred content size, installs the localized "NewPL" right bar button wired to -tapNewPlaylist: (tinted when the running system supports it), and on the phone idiom adds a localized "Close" left bar button wired to -tapClose: . Starts in Playlists mode and seeds the persisted level filter.

Parameters
styleThe table style forwarded to the superclass.
Returns
The initialised controller, or nil if [super initWithStyle:] fails.
Ghidra address:
0x15ca34
Ghidra address:
0x15ca34

◆ musicPlaylistCreateWithName:

- (void) musicPlaylistCreateWithName: (nullable NSString *) name

Adds a playlist with the entered name, persists it, and reloads.

The MusicPlaylistCreateViewControllerDelegate callback.

Parameters
nameThe playlist name.
Ghidra address:
0x15e880

Reimplemented from <MusicPlaylistCreateViewControllerDelegate>.

◆ numberOfSectionsInTableView:

- (NSInteger) numberOfSectionsInTableView: (nonnull UITableView *) tableView

Number of sections: three in Playlists mode, one otherwise.

Parameters
tableViewThe table asking.
Returns
Three in Playlists mode, one otherwise.
Ghidra address:
0x15dcd0

◆ selectLevel:

- (void) selectLevel: (nullable NSNumber *) level

Persists the chosen level and tells the delegate the level filter was picked.

The MusicPlaylistLevelSelectorDelegate callback.

Parameters
levelThe chosen level (one-based), boxed.
Ghidra address:
0x15e630

Reimplemented from <MusicPlaylistLevelSelectorDelegate>.

◆ shouldAutorotate

- (BOOL) shouldAutorotate

Whether the screen rotates at all.

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

◆ shouldAutorotateToInterfaceOrientation:

- (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation

Reports that only the two portrait orientations are supported.

Parameters
interfaceOrientationThe orientation being asked about.
Returns
YES for either portrait orientation.
Ghidra address:
0x15ed50
Ghidra address:
0x15ed50

◆ supportedInterfaceOrientations

- (UIInterfaceOrientationMask) supportedInterfaceOrientations

The orientations the screen allows.

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

◆ tableView:canEditRowAtIndexPath:

- (BOOL) tableView: (nonnull UITableView *) tableView
canEditRowAtIndexPath: (nonnull NSIndexPath *) indexPath 

Whether a row may be edited (swipe-deleted).

Only playlist rows in Playlists mode are editable, and never the currently-selected playlist.

Parameters
tableViewThe table asking.
indexPathThe row's index path.
Returns
YES for an editable playlist row, NO otherwise.
Ghidra address:
0x15df6c

◆ tableView:cellForRowAtIndexPath:

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

Builds a cell for a filter, level, or playlist row.

Parameters
tableViewThe table view.
indexPathThe row's index path.
Returns
The configured cell.
Ghidra address:
0x15d10c

◆ tableView:commitEditingStyle:forRowAtIndexPath:

- (void) tableView: (nonnull UITableView *) tableView
commitEditingStyle: (UITableViewCellEditingStyle) editingStyle
forRowAtIndexPath: (nonnull NSIndexPath *) indexPath 

Deletes a playlist when its row is swiped.

Parameters
tableViewThe table asking.
editingStyleThe editing action committed.
indexPathThe row's index path.
Ghidra address:
0x15dd9c

◆ tableView:didSelectRowAtIndexPath:

- (void) tableView: (nonnull UITableView *) tableView
didSelectRowAtIndexPath: (nonnull NSIndexPath *) indexPath 

Routes a selection: a filter or playlist notifies the delegate, the level row pushes the level selector.

Parameters
tableViewThe table sending the message.
indexPathThe tapped row's index path.
Ghidra address:
0x15e2ec

◆ tableView:heightForFooterInSection:

- (CGFloat) tableView: (nonnull UITableView *) tableView
heightForFooterInSection: (NSInteger) section 

Height for a section's footer.

Parameters
tableViewThe table view.
sectionThe section index.
Returns
4 for the level-filter section in Playlists mode, otherwise 0 .
Ghidra address:
0x15d0a8

◆ tableView:numberOfRowsInSection:

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

Number of rows in a section.

Parameters
tableViewThe table asking.
sectionThe section asked about.
Returns
The row count for that section.
Ghidra address:
0x15dcfc

◆ tableView:willDisplayCell:forRowAtIndexPath:

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

Whitens a cell's background, tinting the level row when a level filter is active.

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

◆ tableView:willSelectRowAtIndexPath:

- (nullable NSIndexPath *) tableView: (nonnull UITableView *) tableView
willSelectRowAtIndexPath: (nonnull NSIndexPath *) indexPath 

Blocks selection of an already-active row.

Parameters
tableViewThe table asking.
indexPathThe row about to be selected.
Returns
The index path when selectable, nil otherwise.
Ghidra address:
0x15e094

◆ tapClose:

- (void) tapClose: (nullable id) sender

Tells the delegate the screen should close.

Parameters
senderThe Close bar button, unused.
Ghidra address:
0x15e7d4

◆ tapLevelSelect

- (void) tapLevelSelect

Empty action; the level filter is instead reached through row selection.

Ghidra address:
0x15e7d0

◆ tapNewPlaylist:

- (void) tapNewPlaylist: (nullable id) sender

Pushes the create-playlist screen.

Parameters
senderThe bar button, unused.
Ghidra address:
0x15e720

◆ viewDidAppear:

- (void) viewDidAppear: (BOOL) animated

Chains up to super .

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

◆ viewDidDisappear:

- (void) viewDidDisappear: (BOOL) animated

Chains up to super .

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

◆ viewDidLoad

- (void) viewDidLoad

Disables exclusive-touch propagation across the navigation bar's subviews.

Ghidra address:
0x15eab8

◆ viewWillAppear:

- (void) viewWillAppear: (BOOL) animated

Chains up to super .

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

◆ viewWillDisappear:

- (void) viewWillDisappear: (BOOL) animated

Chains up to super .

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

Property Documentation

◆ delegate

- (id<MusicPlaylistViewControllerDelegate>) delegate
readwritenonatomicweak

The object told about selections and close events.

Held weakly.

◆ listMode

- (MusicPlaylistListMode) listMode
readwritenonatomicassign

Which list layout the table shows.

The setter also updates the navigation title.

Ghidra address:
0x15cf58

◆ playlistManager

- (MusicPlaylistManager*) playlistManager
readwritenonatomicstrong

The model backing the playlists list.

The setter enables the "new playlist" bar button only while a manager is present and below the playlist cap.


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