All Projects → ww-tech → wwlayout

ww-tech / wwlayout

Licence: Apache-2.0 license
Swifty DSL for programmatic Auto Layout in iOS

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to wwlayout

Uicollectionview Layouts Kit
📐 A set of custom layouts for UICollectionView with examples [Swift 5.3, iOS 12].
Stars: ✭ 410 (+791.3%)
Mutual labels:  layout, constraints, autolayout
Snapkit
A Swift Autolayout DSL for iOS & OS X
Stars: ✭ 18,091 (+39228.26%)
Mutual labels:  layout, constraints, autolayout
Mylinearlayout
MyLayout is a powerful iOS UI framework implemented by Objective-C. It integrates the functions with Android Layout,iOS AutoLayout,SizeClass, HTML CSS float and flexbox and bootstrap. So you can use LinearLayout,RelativeLayout,FrameLayout,TableLayout,FlowLayout,FloatLayout,PathLayout,GridLayout,LayoutSizeClass to build your App 自动布局 UIView UITab…
Stars: ✭ 4,152 (+8926.09%)
Mutual labels:  layout, constraints, autolayout
Kvconstraintkit
An Impressive Auto Layout DSL for iOS, tvOS & OSX. & It is written in pure swift.
Stars: ✭ 91 (+97.83%)
Mutual labels:  layout, constraints, autolayout
StoryboardConstraint
A simple way to use programmatically Autolayout Constraint created in Storyboard.
Stars: ✭ 25 (-45.65%)
Mutual labels:  constraints, autolayout, autolayout-constraints
VanillaConstraints
🍦 Simplified and chainable AutoLayout constraints for iOS.
Stars: ✭ 42 (-8.7%)
Mutual labels:  layout, constraints, autolayout
Easyswiftlayout
Lightweight Swift framework for Apple's Auto-Layout
Stars: ✭ 345 (+650%)
Mutual labels:  layout, constraints, autolayout
EZAnchor
An easier and faster way to code Autolayout
Stars: ✭ 25 (-45.65%)
Mutual labels:  layout, constraints, autolayout
Core Layout
Flexbox & CSS-style Layout in Swift.
Stars: ✭ 215 (+367.39%)
Mutual labels:  layout, constraints, autolayout
Stevia
🍃 Concise Autolayout code
Stars: ✭ 3,182 (+6817.39%)
Mutual labels:  layout, constraints, autolayout
Easypeasy
Auto Layout made easy
Stars: ✭ 1,877 (+3980.43%)
Mutual labels:  layout, auto-layout, constraints
Tinyconstraints
Nothing but sugar.
Stars: ✭ 3,721 (+7989.13%)
Mutual labels:  layout, constraints
Nerdyui
An easy way to create and layout UI components for iOS.
Stars: ✭ 381 (+728.26%)
Mutual labels:  layout, constraints
Autoinch
优雅的iPhone全尺寸/等比例精准适配工具
Stars: ✭ 395 (+758.7%)
Mutual labels:  layout, autolayout
Keyboardlayoutguide
⌨️ Manage iOS keyboard with Apple's missing KeyboardLayoutGuide
Stars: ✭ 1,054 (+2191.3%)
Mutual labels:  layout, autolayout
Snapkitextend
SnapKit的扩展,SnapKit类似于Masonry,但是其没有对Arry的设置和对等间距排列的布局等,此扩展是类似Masonry的写法对SnapKit的补充,同时补充九宫格布局方式
Stars: ✭ 110 (+139.13%)
Mutual labels:  layout, constraints
Framelayoutkit
FrameLayoutKit is a super fast and easy to use autolayout kit
Stars: ✭ 53 (+15.22%)
Mutual labels:  layout, autolayout
Flexlib
FlexLib是一个基于flexbox模型,使用xml文件进行界面布局的框架,融合了web快速布局的能力,让iOS界面开发像写网页一样简单快速
Stars: ✭ 1,569 (+3310.87%)
Mutual labels:  layout, autolayout
Arranged
Open source replacement of UIStackView for iOS 8 (100% layouts supported)
Stars: ✭ 202 (+339.13%)
Mutual labels:  layout, constraints
Layoutframeworkbenchmark
Benchmark the performances of various Swift layout frameworks (autolayout, UIStackView, PinLayout, LayoutKit, FlexLayout, Yoga, ...)
Stars: ✭ 316 (+586.96%)
Mutual labels:  layout, autolayout

WWLayout

WWLayout

Easy to write auto layout constraints, with minimal extensions to standard namespaces.

Feature Highlights

  • Easy to use, readable API
  • Backwards-compatible (i.e. pre iOS 11) Safe Area constraints
  • Tag constraints to easily switch between different layouts (coming soon)
  • Automatic switching of size-class based constraints (coming soon)

Introduction

Constraints are added to a view using the view's layout property, like so:

    myView.layout.width(400)

Multiple constraints are easily added by chaining calls:

    myView.layout.width(400).height(200)

A more complicated example:

    let container = UIView()
    let child = UIView()

    container.layout.fill(.safeArea)

    child.layout
      .fill(container, axis: .x, inset: 20)
      .center(in: container, axis: .y, priority: .high)
      .top(.lessOrEqual, to: container, offset: 100)
      .height(toWidth: 0.5)

Dcumentation

Documentation can be found here

Installation

Swift Package Manager

The WWLayout Package URL is:

https://github.com/ww-tech/wwlayout.git

Add the package dependency to your Xcode project using the File -> Swift Packages -> Add Package Dependency... menu item.

Cocoapods

Simply add WWLayout to your Podfile:

  pod 'WWLayout'

Contributing

Authors

License

WWLayout is © copyright by WW International.

WWLayout is licensed under the Apache-2.0 Open Source license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].