Table of contents



Official Content

To create a User Control object for Apple you will have to take care of several things.

Take into account that the User Control should be compatible with XCFramework.

Implement the control in the Target Platform

Item User Controls

  • Deploy your Base Class which will subclass the GXControlEditableWithLabelSingleEditorViewBase class.
  • Create new properties and synthesize them.
  • Implement the -newEditorViewWithFrame: method to render your desired User Control layout.
  • Implement the GXControlEditableWithLabelSingleEditorViewBase abstract methods.
  • Override the necessary GXControlWithLabelBase methods.

List User Controls

  • Deploy your Base Class which will subclass the GXControlGridBase class. 
  • Implement the -newGridViewWithFrame: method, which will be called by the base class when loading the view; you will have to render your desired User Control layout.
  • Create a public method to return your view:
- (UIMyView *)myView {
    return (UIMyView *)[self gridView];
}
  • Access the control properties defined by implementing resolvers for each defined property. You can use helper methods such as the following:
- (NSString *)attributeName {
    return [ [self properties] getPropertyValueString:@"@MyUserControlNameAttributeName"];   
}
  • Implement the -reloadData: method to load the User Control data from the GeneXus provider.
  • Define the default action and other actions the user control should respond to.

Packaging

List and Item User Controls for Smar Devices implementations must be packaged as a Framework.

Control Definition in GeneXus

Follow the steps detailed in: Creating a User Control Definition for Native Mobile applications.

Execute GeneXus with the /install option and make sure it is available in an object for Native Mobile application.

Deployment

  • Copy the User Control folder and paste it on other GeneXus installations.

Note: There is a living code sample of a basic User Control implementation that can be found on GitHub. Take a look at Native Mobile Extensions Repository Sample.

Samples

Follow these links:

Or check:

See also




Last update: November 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant