Latest 1.0.1
License MIT
Platforms ios

PWAlignView is a light-weight class to help you layout some simple views (UIView, UIImageView, UIButton, … ), which need to to be aligned on some direction.

What’s new in 1.0.1

  • fix layout problem in PWAlignViewAlignOptionStrategyLR when view is out of alignView’s frame

  • code refactor

  • refine example UI


    PWAlignView *alignView = [[PWAlignView alloc] initWithFrame:self.view.frame];
    alignView.lineHeight = 45.0f;
    alignView.itemSpace = 5.0f;
    alignView.edgeInsets = UIEdgeInsetsMake(15, 15, 15, 15);
    alignView.alignOption = PWAlignViewAlignOptionLeftToRight;
    [self.view addSubview:alignView];

    [alignView appendWithViewArray:array];

Layout Types

Left To Right (Default)

alignView.alignOption = PWAlignViewAlignOptionLeftToRight;

Right To Left

alignView.alignOption = PWAlignViewAlignOptionRightToLeft;


pod "PWAlignView"



MIT License

see license file

Latest podspec

    "name": "PWAlignView",
    "version": "1.0.1",
    "summary": "Align and arrange collection of views (UIView, UIImageView, UIButton, u2026 ) on different directions.",
    "description": "PWAlignView is a light-weight class to help you layout some simple view, which need to align on some direction.",
    "homepage": "",
    "screenshots": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Prince": "[email protected]"
    "platforms": {
        "ios": null
    "source": {
        "git": "",
        "tag": "1.0.1"
    "source_files": "PWAlignView/*.{h,m}",
    "requires_arc": false

Pin It on Pinterest

Share This