-
Notifications
You must be signed in to change notification settings - Fork 257
FlexLib Classes
It's replacement for UIScrollView. The main goal is to calculate the content size automatically. The layout will change automatically when change subview's text, hidden, attributedText. Otherwise you need call markDirty if you change other view attribute.
It's replacement for UIButton. You can still use UIButton, but FlexTouchView is more powerful.
It's replacement for UITextView. This control will adjust it's frame when input new text.
By default, FlexModalView instance will hide after initial. You can call showModalInView to display it and hideModal to hide it.
In most case you should use FlexBaseVC or FlexBaseTableCell. But you should use FlexRootView if you want to add custom layout to other view.
If you want to add xml layout view to traditional view, FlexFrameView is good for you. This class doesn't use flexbox layout. Instead it maintain a flexbox child view and give you an easy interface.
This class is designed for writing custom views with layout file. You should derive class from it and override getFlexName & onInit, create xml layout file and other extension. Then you can use this custom class in layout file.
You should use it as parent if you want to add or delete views dynamically. After add or delete subviews, you should call markDirty.
Flexbox Introduction & performance (in Chinese)
Tutorial 1: Create View Controller with xml layout
Tutorial 2: Create Table Cell with xml layout
Tutorial 3: Embed xml layout into traditional view hierarchy
Tutorial 4: Use custom view in xml layout
Tutorial 5: Create reusable view using xml layout file