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

A modal screen that asks the user to name a new music playlist. More...

#include <MusicPlaylistCreateViewController.h>

Inheritance diagram for MusicPlaylistCreateViewController:
Collaboration diagram for MusicPlaylistCreateViewController:

Instance Methods

(instancetype) - init
 Builds the controller and its navigation bar.
(void) - loadView
 Builds the view hierarchy by hand.
(void) - fieldChanged:
 Enables the Done button only while the field is non-empty.
(void) - tapDone:
 Commits the entered name and pops the controller.
(BOOL) - textFieldShouldReturn:
 Treats the return key as the Done button when the field is non-empty.
(BOOL) - textField:shouldChangeCharactersInRange:replacementString:
 Enforces the maximum name length and always allows a bare newline.
(void) - viewWillAppear:
 Lays the field out and asks the system not to extend the layout under the bars.
(void) - viewDidAppear:
 Gives the field focus once the screen is on-screen.
(void) - viewWillDisappear:
 Dismisses the keyboard as the screen leaves.
(void) - viewDidDisappear:
 Chains up to super only.
(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

id< MusicPlaylistCreateViewControllerDelegate > delegate
 The object told which name the user entered.

Detailed Description

A modal screen that asks the user to name a new music playlist.

Method Documentation

◆ fieldChanged:

- (void) fieldChanged: (nullable id) sender

Enables the Done button only while the field is non-empty.

Parameters
senderThe text field that changed.
Ghidra address:
0x166c40

◆ init

- (instancetype) init

Builds the controller and its navigation bar.

Sets the navigation title to the localized "New Playlist", installs a disabled system Done button as the right bar button item wired to -tapDone: , and gives the back button the localized "Cancel" title.

Returns
The initialised controller.
Ghidra address:
0x1667c8
Ghidra address:
0x1667c8

◆ loadView

- (void) loadView

Builds the view hierarchy by hand.

Creates the rounded-rect text field, disables autocapitalisation and autocorrection, gives it the localized "Playlist Name" placeholder and a Done return key, wires its editing-changed event to -fieldChanged: , makes the controller its delegate, and adds it to the view.

Ghidra address:
0x166a04
Ghidra address:
0x166a04

◆ shouldAutorotate

- (BOOL) shouldAutorotate

Whether the screen rotates at all.

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

◆ 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:
0x16716c
Ghidra address:
0x16716c

◆ supportedInterfaceOrientations

- (UIInterfaceOrientationMask) supportedInterfaceOrientations

The orientations the screen allows.

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

◆ tapDone:

- (void) tapDone: (nullable id) sender

Commits the entered name and pops the controller.

Dismisses the keyboard, and when the whitespace-trimmed text is non-empty tells the delegate the raw name, then pops back up the navigation stack.

Parameters
senderThe Done button, or nil when invoked from -textFieldShouldReturn: .
Ghidra address:
0x166cb0

◆ textField:shouldChangeCharactersInRange:replacementString:

- (BOOL) textField: (nullable UITextField *) textField
shouldChangeCharactersInRange: (NSRange) range
replacementString: (nullable NSString *) string 

Enforces the maximum name length and always allows a bare newline.

Parameters
textFieldThe text field being edited.
rangeThe range being replaced.
stringThe replacement text.
Returns
YES when the change is permitted.
Ghidra address:
0x166eac

◆ textFieldShouldReturn:

- (BOOL) textFieldShouldReturn: (nullable UITextField *) textField

Treats the return key as the Done button when the field is non-empty.

Parameters
textFieldThe text field. Unused.
Returns
Always YES .
Ghidra address:
0x166e30

◆ viewDidAppear:

- (void) viewDidAppear: (BOOL) animated

Gives the field focus once the screen is on-screen.

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

◆ viewDidDisappear:

- (void) viewDidDisappear: (BOOL) animated

Chains up to super only.

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

◆ viewWillAppear:

- (void) viewWillAppear: (BOOL) animated

Lays the field out and asks the system not to extend the layout under the bars.

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

◆ viewWillDisappear:

- (void) viewWillDisappear: (BOOL) animated

Dismisses the keyboard as the screen leaves.

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

Property Documentation

◆ delegate

- (id<MusicPlaylistCreateViewControllerDelegate>) delegate
readwritenonatomicweak

The object told which name the user entered.

Ghidra address:
0x1671c4
Ghidra address:
0x1671e4

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