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;
@end
@ implementation UILabel (TextAppearance)
-(void)setAppearanceAlignment(NSTextAlignment)alignment {
[self setTextAlignment:alignment]; }
-(NSTextAlignment)appearanceAlignment {
return self.textAlignment; }
@end
How can I do the same with Delphi/FMX?