MLLayout

MIT License
Objective-C
iOS

1 image

Author

Description

Flexbox in Objective-C, using Facebook's css-layout.

Inspired by React Native.

  • Flexbox is the best way to layout in mobile platform. So many popular libraries use it, eg: componentkit, AsyncDisplayKit, React Native, weex and so on.

  • React Native,weex and MLLayout are based on the C implementation of facebook/css-layout.

  • Some code references from React Native, eg: snapping to the pixel grid(No misaligned images to improve drawing performance]).

  • MLLayout can be just used for layout calculation. The calculation will update frames of layouts. Every layout associated with a view usually. You may or may choose not to use the frames or change them. with your mind.

  • MLTagViewFrameRecord can preserve current topology of layouts or views. A prerequisite is that each has a valid tag.

  • Using MLTagViewFrameRecord related TableView and TableViewCell can ensure that the layout calculation for one row would not be excuted twice unless reloading it explicitly. The feather can improve scrolling performance greatly.

Tags