To create a User Control for iOS you will have to take care of several things.
- 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.
- 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.
List and Item User Controls for Smar Devices implementations must be packaged as a Framework.
Follow the steps detailed in this article.
Execute GeneXus with the /install option and make sure it is available in a Smart Device object.
- Copy the User Control folder and paste it on other GeneXus installations.
Follow this how to's
Or check: