Custom View

Custom View is a view which is used as a container or parent to other views. The differences from Basic View is Custom View can be used to hide unnecessary attributes or views from the user or in the generated code. As in the image below, a Custom View only show necessary attributes and its subviews are also hidden. You can edit all attributes and the hidden subviews when editing Custom View in its tab.

iOS Development Notes: In iOS development, a custom view is similar to UIView subclass. A UIView subclass can be used to encapsulate code, make code reusable, more readable and organized by hiding unnecessary codes in the view.

A Custom View selected at Main tab


View Attributes

Attributes for custom view is similar with basic view. However, initially most of the attributes are private or not shown at Main tab. There is additional attributes for custom view

  • Class name: Code Generator generates a Custom View in a separate class, the Code Generator will use class name to rename the file.

Additionally, custom view also supports private attributes and derived attributes.

Editing Custom View

To edit a custom view, simply double click at the custom view, which will open a new tab to edit the view.

In the opened custom view tab, you can add any views to be a part of the custom view. Any view added in the tab is considered as private and will not be shown in Main tab.

Initial state when editing custom view in new tab