Recents

Creating User Controls for iOSOfficial Content

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

Implement the control in the Target Platform

Item User Controls

  • Deploy your Base Class which will subclass the GXControlEditableWithLabelSingleEditorViewBase class.
  • Create new properties and synthezise 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 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 this article.

Execute GeneXus with the /install option and make sure it is available in a Smart Device object.

Deployment

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

Samples

Follow this how to's

Or check:



Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.