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

A label that becomes first responder when tapped and offers a Copy menu. More...

#include <CopyableUiLabel.h>

Inheritance diagram for CopyableUiLabel:
Collaboration diagram for CopyableUiLabel:

Instance Methods

(instancetype) - initWithFrame:
 Makes the label transparent and, crucially, touchable.
(void) - touchesEnded:withEvent:
 Takes first responder status and shows the edit menu over the label.
(BOOL) - canBecomeFirstResponder
 Always YES, so the edit menu can appear.
(BOOL) - canPerformAction:withSender:
 Allows copy: and defers every other action to the superclass.
(void) - copy:
 Puts the label's text on the general pasteboard.

Detailed Description

A label that becomes first responder when tapped and offers a Copy menu.

The class declares no ivars and no properties. All five members are overrides.

Method Documentation

◆ canBecomeFirstResponder

- (BOOL) canBecomeFirstResponder

Always YES, so the edit menu can appear.

Returns
YES.
Ghidra address:
0xcafcc
Ghidra address:
0xcafcc

◆ canPerformAction:withSender:

- (BOOL) canPerformAction: (SEL) action
withSender: (nullable id) sender 

Allows copy: and defers every other action to the superclass.

Parameters
actionThe action being offered.
senderThe menu.
Returns
Whether the label handles that action.
Ghidra address:
0xcafd4

◆ copy:

- (void) copy: (nullable id) sender

Puts the label's text on the general pasteboard.

Parameters
senderThe menu item. Unused.
Ghidra address:
0xcb024

◆ initWithFrame:

- (instancetype) initWithFrame: (CGRect) frame

Makes the label transparent and, crucially, touchable.

UILabel has user interaction off by default, so without this nothing else here would ever run.

Parameters
frameThe label's frame, passed straight to the superclass.
Returns
The initialised label.
Ghidra address:
0xcae50
Ghidra address:
0xcae50

◆ touchesEnded:withEvent:

- (void) touchesEnded: (NSSet *) touches
withEvent: (nullable UIEvent *) event 

Takes first responder status and shows the edit menu over the label.

Parameters
touchesThe touches, forwarded to the superclass.
eventThe event, forwarded to the superclass.
Ghidra address:
0xcaeec

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