This question already has an answer here:
What are good uses for class helpers?
Is it possible to create categories to define custom additional methods for existing iOS classes and controls in Delphi/FMX (like in Xcode, without subclassing?
For example, i want to change the appearance of UILabel, especialy the text alignment of them, within a UIAlertContoller class. In Xcode I would simply create a neu category for UILabel with a new method:
@interface UILabel (TextAppearance) @property (nonatomic, assign) NSTextAlignment appearanceAlignment UI_APPEARANCE_SELECTOR;
@ implementation UILabel (TextAppearance)
[self setTextAlignment:alignment]; }
return self.textAlignment; }
How can I do the same with Delphi/FMX?