All Projects → bielikb → UseAutoLayout

bielikb / UseAutoLayout

Licence: MIT license
UseAutoLayout @propertyWrapper for Swift

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to UseAutoLayout

Panda
Panda is an asynchronous render and layout framework which can be used to achieve high performance tableview.
Stars: ✭ 177 (+608%)
Mutual labels:  autolayout
SDCAutoLayout
A UIView category that simplifies dealing with Auto Layout
Stars: ✭ 23 (-8%)
Mutual labels:  autolayout
StackableTableView
A UITableView subclass that enables setting an array of views for both headers and footers utilizing UIStackView
Stars: ✭ 72 (+188%)
Mutual labels:  autolayout
Quicklayout
Written in pure Swift, QuickLayout offers a simple and easy way to manage Auto Layout in code.
Stars: ✭ 213 (+752%)
Mutual labels:  autolayout
Automatic Height Tagcells
This is a sample project to implement features with dynamic height of UITableViewCell based on autolayout, tags aligned automatically and clickable tags.
Stars: ✭ 229 (+816%)
Mutual labels:  autolayout
SBLayout
【一行代码搞定无论多复杂的约束】AutoLayout for iOS/macOS by swift
Stars: ✭ 46 (+84%)
Mutual labels:  autolayout
Devicelayout
📱AutoLayout can be set differently for each device
Stars: ✭ 170 (+580%)
Mutual labels:  autolayout
VanillaConstraints
🍦 Simplified and chainable AutoLayout constraints for iOS.
Stars: ✭ 42 (+68%)
Mutual labels:  autolayout
Ragrid
Intrinsic first auto-layout flexbox grid
Stars: ✭ 249 (+896%)
Mutual labels:  autolayout
GoneVisible
GoneVisible is a UIView extension that uses AutoLayout to add "gone" state like Android.
Stars: ✭ 27 (+8%)
Mutual labels:  autolayout
Flowkit
A declarative type-safe framework for building fast and flexible list with Tables & Collection
Stars: ✭ 215 (+760%)
Mutual labels:  autolayout
Fluid For Sketch
[Sketch Plugin] Sketch-flavored Auto Layout-like Constraints
Stars: ✭ 2,408 (+9532%)
Mutual labels:  autolayout
iOSProjects
It's project that contains different applications developed with Swift 5.7 👨‍💻👩🏼‍💻🧑🏿‍💻
Stars: ✭ 122 (+388%)
Mutual labels:  autolayout
Kiwi.js
Fast TypeScript implementation of the Cassowary constraint solving algorithm 🖖
Stars: ✭ 206 (+724%)
Mutual labels:  autolayout
Partial
Type-safe wrapper mirroring the wrapped type's properties, making each property optional
Stars: ✭ 61 (+144%)
Mutual labels:  property-wrapper
Notautolayout
Layout your views without Auto Layout constraints, in a much more swifty way.
Stars: ✭ 171 (+584%)
Mutual labels:  autolayout
StoryboardConstraint
A simple way to use programmatically Autolayout Constraint created in Storyboard.
Stars: ✭ 25 (+0%)
Mutual labels:  autolayout
Driftwood
Driftwood is a DSL to make Auto Layout easy on iOS, tvOS and macOS.
Stars: ✭ 14 (-44%)
Mutual labels:  autolayout
Constrainable
simple declarative autolayout µframework based on Swift 4 KeyPath
Stars: ✭ 26 (+4%)
Mutual labels:  autolayout
SideMenuSwiftDemo
SideMenu in Swift with autolayout
Stars: ✭ 79 (+216%)
Mutual labels:  autolayout

@UseAutoLayout

Property wrapper that enables autolayout on applied views.

Declaration:

@UseAutoLayout property wrapper

@propertyWrapper
public struct UseAutoLayout<T: UIView> {
    public var wrappedValue: T {
        didSet {
            setAutoLayout()
        }
    }

    public init(wrappedValue: T) {
        self.wrappedValue = wrappedValue
        setAutoLayout()
    }

    func setAutoLayout() {
        wrappedValue.translatesAutoresizingMaskIntoConstraints = false
    }
}

Usage

@UseAutoLayout var label = UILabel()

Installation

Property wrappers are defined in Swift 5.1. Using @UseAutoLayout requires Xcode 11.0(and above) and Swift 5.1 toolchain

Swift Package Manager

Add .package(url: "https://github.com/bielikb/UseAutoLayout.git", from: "1.0.0") to your Package.swift file's dependencies.

If youre using Xcode 11.0 add this Swift Package to your target(s) using Xcode.

Example

Sample


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].