Skip to content

FlexLib Classes

zhenglibao edited this page Jan 6, 2018 · 9 revisions

FlexScrollView

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.

FlexTouchView & FlexTouchMaskView

It's replacement for UIButton. You can still use UIButton, but FlexTouchView is more powerful.

FlexTextView

It's replacement for UITextView. This control will adjust it's frame when input new text.

FlexModalView

By default, FlexModalView instance will hide after initial. You can call showModalInView to display it and hideModal to hide it.

FlexRootView

In most case you should use FlexBaseVC or FlexBaseTableCell. But you should use FlexRootView if you want to add custom layout to other view.

FlexFrameView

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.

FlexCustomBaseView

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.

FlexContainerView

You should use it as parent if you want to add or delete views dynamically. After add or delete subviews, you should call markDirty.

Clone this wiki locally