Skip to content

FPLinearLayout is a view container that automatically handle children positions for you in a linear fashion.

License

Notifications You must be signed in to change notification settings

FingertiP/FPLinearLayout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FPLinearLayoutView

FPLinearLayoutView enables you to add a view as a child without worrying about the position. FPLinearLayoutView will handle every added views and place them at a right place (according to the selected direction). This basically makes UIView behaves like Android's linear layout.

Feature

  • Behaves like normal UIView.
  • Automatically handles children view position according to a decided direction.
  • The child view can be oriented in horizontal or vertical direction.
  • The margin of a to-be-added view can be specified (top-left margin).

Usage Example

// Horizontal oriented layout.
FPLinearLayoutView *layoutView = [FPLinearLayoutView horizontalLayout];

// Appending view with default margin.
UIView* view = [[UIView alloc] initWithFrame:CGRect(0, 0, 320, 100)];
[layoutView appendView:view]

// Appending view with specific margins.
UIView* view = [[UIView alloc] initWithFrame:CGRect(0, 0, 320, 100)];
[layoutView appendView:view marginLeft:10.0f marginTop:20.0f];

About

FPLinearLayout is a view container that automatically handle children positions for you in a linear fashion.

Resources

License

Stars

Watchers

Forks

Packages

No packages published