The ultimate API for iOS & OS X Auto Layout — impressively simple, immensely powerful. Objective-C and Swift compatible.

Overview

PureLayout

Build Status Version Platform License

The ultimate API for iOS & OS X Auto Layout — impressively simple, immensely powerful. PureLayout extends UIView/NSView, NSArray, and NSLayoutConstraint with a comprehensive Auto Layout API that is modeled after Apple's own frameworks. PureLayout is a cross-platform Objective-C library that works (and looks!) great in Swift. It is fully backwards-compatible with all versions of iOS and OS X that support Auto Layout.

Writing Auto Layout code from scratch isn't easy. PureLayout provides a fully capable and developer-friendly interface for Auto Layout. It is designed for clarity and simplicity, and takes inspiration from the AutoLayout UI options available in Interface Builder while delivering far more flexibility. The API is also highly efficient, as it adds only a thin layer of third party code and is engineered for maximum performance.

Table of Contents

  1. Setup
  2. API Cheat Sheet
  3. Usage
  1. PureLayout vs. the rest
  2. Problems, Suggestions, Pull Requests?

Setup

Compatibility

The current release of PureLayout supports all versions of iOS and OS X since the introduction of Auto Layout on each platform, in both Swift and Objective-C, with a single codebase!

  • Xcode
    • Language Support: Swift (any version), Objective-C
    • Fully Compatible With: Xcode 7.0
    • Minimum Supported Version: Xcode 5.0
  • iOS
    • Fully Compatible With: iOS 9.0
    • Minimum Deployment Target: iOS 6.0
  • OS X
    • Fully Compatible With: OS X 10.11
    • Minimum Deployment Target: OS X 10.7

Using CocoaPods

  1. Add the pod PureLayout to your Podfile.
pod 'PureLayout'
  1. Run pod install from Terminal, then open your app's .xcworkspace file to launch Xcode.
  2. Import the PureLayout.h umbrella header.
  • With use_frameworks! in your Podfile
    • Swift: import PureLayout
    • Objective-C: #import <PureLayout/PureLayout.h> (or with Modules enabled: @import PureLayout;)
  • Without use_frameworks! in your Podfile
    • Swift: Add #import "PureLayout.h" to your bridging header.
    • Objective-C: #import "PureLayout.h"

That's it - now go write some beautiful Auto Layout code!

Using Carthage

  1. Add the PureLayout/PureLayout project to your Cartfile.
github "PureLayout/PureLayout"
  1. Run carthage update, then follow the additional steps required to add the framework into your project.
  2. Import the PureLayout framework/module.
  • Swift: import PureLayout
  • Objective-C: #import <PureLayout/PureLayout.h> (or with Modules enabled: @import PureLayout;)

That's it - now go write some beautiful Auto Layout code!

Manually from GitHub

  1. Download the source files in the PureLayout subdirectory.
  2. Add the source files to your Xcode project.
  3. Import the PureLayout.h header.
  • Swift: Add #import "PureLayout.h" to your bridging header.
  • Objective-C: #import "PureLayout.h"

That's it - now go write some beautiful Auto Layout code!

App Extensions

To use PureLayout in an App Extension, you need to do a bit of extra configuration to prevent usage of unavailable APIs. Click here for more info.

Releases

Releases are tagged in the git commit history using semantic versioning. Check out the releases and release notes for each version.

API Cheat Sheet

This is just a handy overview of the core API methods. Explore the header files for the full API, and find the complete documentation above the implementation of each method in the corresponding .m file. A couple of notes:

  • All of the public API methods are namespaced with the prefix auto..., which also makes it easy for Xcode to autocomplete as you type.
  • Methods that create constraints also automatically install (activate) the constraint(s), then return the new constraint(s) for you to optionally store for later adjustment or removal.
  • Many methods below also have a variant which includes a relation: parameter to make the constraint an inequality.

Attributes

PureLayout defines view attributes that are used to create auto layout constraints. Here is an illustration of the most common attributes.

There are 5 specific attribute types, which are used throughout most of the API:

  • ALEdge
  • ALDimension
  • ALAxis
  • ALMargin available in iOS 8.0 and higher only
  • ALMarginAxis available in iOS 8.0 and higher only

Additionally, there is one generic attribute type, ALAttribute, which is effectively a union of all the specific types. You can think of this as the "supertype" of all of the specific attribute types, which means that it is always safe to cast a specific type to the generic ALAttribute type. (Note that the reverse is not true -- casting a generic ALAttribute to a specific attribute type is unsafe!)

UIView/NSView

- autoSetContent(CompressionResistance|Hugging)PriorityForAxis:
- autoCenterInSuperview(Margins) // Margins variant iOS 8.0+ only
- autoAlignAxisToSuperview(Margin)Axis: // Margin variant iOS 8.0+ only
- autoPinEdgeToSuperview(Edge:|Margin:)(withInset:) // Margin variant iOS 8.0+ only
- autoPinEdgesToSuperview(Edges|Margins)(WithInsets:)(excludingEdge:) // Margins variant iOS 8.0+ only
- autoPinEdge:toEdge:ofView:(withOffset:)
- autoAlignAxis:toSameAxisOfView:(withOffset:|withMultiplier:)
- autoMatchDimension:toDimension:ofView:(withOffset:|withMultiplier:)
- autoSetDimension(s)ToSize:
- autoConstrainAttribute:toAttribute:ofView:(withOffset:|withMultiplier:)
- autoPinTo(Top|Bottom)LayoutGuideOfViewController:withInset: // iOS only
- autoPinEdgeToSuperviewSafeArea: // iOS 11.0+ only
- autoPinEdgeToSuperviewSafeArea:withInset: // iOS 11.0+ only

NSArray

// Arrays of Constraints
- autoInstallConstraints
- autoRemoveConstraints
- autoIdentifyConstraints: // iOS 7.0+, OS X 10.9+ only

// Arrays of Views
- autoAlignViewsToEdge:
- autoAlignViewsToAxis:
- autoMatchViewsDimension:
- autoSetViewsDimension:toSize:
- autoSetViewsDimensionsToSize:
- autoDistributeViewsAlongAxis:alignedTo:withFixedSpacing:(insetSpacing:)(matchedSizes:)
- autoDistributeViewsAlongAxis:alignedTo:withFixedSize:(insetSpacing:)

NSLayoutConstraint

+ autoCreateAndInstallConstraints:
+ autoCreateConstraintsWithoutInstalling:
+ autoSetPriority:forConstraints:
+ autoSetIdentifier:forConstraints: // iOS 7.0+, OS X 10.9+ only
- autoIdentify: // iOS 7.0+, OS X 10.9+ only
- autoInstall
- autoRemove

Usage

Sample Code (Swift)

PureLayout dramatically simplifies writing Auto Layout code. Let's take a quick look at some examples, using PureLayout from Swift.

Initialize the view using PureLayout initializer:

let view1 = UIView(forAutoLayout: ())

If you need to use a different initializer (e.g. in UIView subclass), you can also use configureForAutoLayout:

view1.configureForAutoLayout() // alternative to UIView.init(forAutoLayout: ())

Here's a constraint between two views created (and automatically activated) using PureLayout:

view1.autoPinEdge(.top, toEdge: .bottom, ofView: view2)

Without PureLayout, here's the equivalent code you'd have to write using Apple's Foundation API directly:

NSLayoutConstraint(item: view1, attribute: .top, relatedBy: .equal, toItem: view2, attribute: .bottom, multiplier: 1.0, constant: 0.0).active = true

Many APIs of PureLayout create multiple constraints for you under the hood, letting you write highly readable layout code:

// 2 constraints created & activated in one line!
logoImageView.autoCenterInSuperview()

// 4 constraints created & activated in one line!
textContentView.autoPinEdgesToSuperviewEdges(with insets: UIEdgeInsets(top: 20.0, left: 5.0, bottom: 10.0, right: 5.0))

PureLayout always returns the constraints it creates so you have full control:

let constraint = skinnyView.autoMatchDimension(.height, toDimension: .width, ofView: tallView)

PureLayout supports safearea with iOS 11.0+:

view2.autoPinEdge(toSuperviewSafeArea: .top)

PureLayout supports all Auto Layout features including inequalities, priorities, layout margins, identifiers, and much more. It's a comprehensive, developer-friendly way to use Auto Layout.

Check out the example apps below for many more demos of PureLayout in use.

Example Apps

Open the project included in the repository (requires Xcode 6 or higher). It contains iOS (Example-iOS scheme) and OS X (Example-Mac scheme) demos of the library being used in various scenarios. The demos in the iOS example app make a great introductory tutorial to PureLayout -- run each demo, review the code used to implement it, then practice by making some changes of your own to the demo code.

Each demo in the iOS example app has a Swift and Objective-C version. To compile & run the Swift demos, you must use Xcode 7.0 or higher (Swift 2.0) and choose the Example-iOS-Xcode7 scheme. When you run the example app, you can easily switch between using the Swift and Objective-C versions of the demos. To see the constraints in action while running the iOS demos, try using different device simulators, rotating the device to different orientations, as well as toggling the taller in-call status bar in the iOS Simulator.

On OS X, while running the app, press any key to cycle through the demos. You can resize the window to see the constraints in action.

Tips and Tricks

Check out some Tips and Tricks to keep in mind when using the API.

PureLayout vs. the rest

There are quite a few different ways to implement Auto Layout. Here is a quick overview of the available options:

  • Apple NSLayoutConstraint SDK API
    • Pros: Raw power
    • Cons: Extremely verbose; tedious to write; difficult to read
  • Apple Visual Format Language
    • Pros: Concise; convenient
    • Cons: Doesn't support some use cases; lacks compile-time checking and safety; must learn syntax; hard to debug
  • Apple Interface Builder
    • Pros: Visual; interactive; provides compile-time layout checking
    • Cons: Difficult for complex layouts; cannot dynamically set constraints at runtime; encourages hardcoded magic numbers; not always WYSIWYG
  • Apple NSLayoutAnchor SDK API
    • Pros: Clean, readable, and type-safe API for creating individual constraints
    • Cons: Only available in iOS 9.0 and OS X 10.11 and higher; requires manually activating each constraint; no API for creating multiple constraints at once
  • PureLayout
    • Pros: Compatible with Objective-C and Swift codebases; consistent with Cocoa API style; cross-platform API and implementation shared across iOS and OS X; fully backwards-compatible to iOS 6 & OS X 10.7; easy to use; type-safe; efficient
    • Cons: Not the most concise expression of layout code
  • High-level Auto Layout Libraries/DSLs (Cartography, SnapKit, KeepLayout)
    • Pros: Very clean, concise, and convenient
    • Cons: Unique API style is foreign to Apple's APIs; mixed compatibility with Objective-C & Swift; greater dependency on third party code

PureLayout takes a balanced approach to Auto Layout that makes it well suited for any project.

Problems, Suggestions, Pull Requests?

Please open a new Issue here if you run into a problem specific to PureLayout, have a feature request, or want to share a comment. Note that general Auto Layout questions should be asked on Stack Overflow.

Pull requests are encouraged and greatly appreciated! Please try to maintain consistency with the existing code style. If you're considering taking on significant changes or additions to the project, please communicate in advance by opening a new Issue. This allows everyone to get onboard with upcoming changes, ensures that changes align with the project's design philosophy, and avoids duplicated work.

Meta

Originally designed & built by Tyler Fox (@smileyborg). Currently maintained by Mickey Reiss (@mickeyreiss). Distributed with the MIT license.

Comments
  • Added apis for using AutoLayout to superview safearea

    Added apis for using AutoLayout to superview safearea

    It's adaptive for safeAreaLayoutGuide of iOS 11. ( #199 )

    For setting AutoLayout to superview safearea, we need to use NSLayoutAnchor.
    This PR makes us to be able to write it more like PureLayout.

    Now:

    subview.topAnchor.constraint(
        equalTo: view.safeAreaLayoutGuide.topAnchor
        ).isActive = true
    

    Using PureLayout in this PR:

    subview.autoPinEdge(toSuperviewSafeArea: .top)
    
    opened by himaratsu 33
  • Use runtime check for app extensions instead of PURELAYOUT_APP_EXTENSIONS macro

    Use runtime check for app extensions instead of PURELAYOUT_APP_EXTENSIONS macro

    Should solve https://github.com/PureLayout/PureLayout/issues/245 and remove the requirement to have PURELAYOUT_APP_EXTENSIONS defined to use PureLayout in app extensions.

    The reason why I resort to runtime check boils down to the fact that @available(iOSApplicationExtension 8.0, *)) didn't work as expected:

    1. It didn't fix the compilation error when building against the framework. I.e the same sharedApplication is unavailable.
    2. Unit tests would gladly enter the branch with if (@available(iOSApplicationExtension 8.0, *)) { even though it looks like they run as normal apps.

    Based on my tests, application extensions have appex extension. Masking the call to sharedApplication helps to avoid the compilation error.

    Further thoughts: I think that leveraging UIView to determine the effective layout direction is probably a better way to solve that, we have a common superview which can be used for that.

    opened by pronebird 22
  • Travis CI build fix;

    Travis CI build fix;

    Hi there, This PR addresses the issue #148 . I was following the idea of having PL prefix for each macro. As a suggestion @mickeyreiss what do you think about treating warnings as errors?

    Also, I had to specify the ruby version to be able to run travis with slather gem.

    opened by Antondomashnev 16
  • PureLayout needs a new maintainer!

    PureLayout needs a new maintainer!

    Due to upcoming changes in my employment, I will no longer be able to serve as the maintainer for PureLayout. :disappointed:

    Fortunately, PureLayout has never been in better shape, and I see an extremely bright future ahead for the library! ☀️ This project is not being deprecated (it's a core dependency for thousands of developers and apps of all sizes)!

    I'm actively seeking one or more people who are passionate about the project and are interested in taking on responsibility as a maintainer.

    What responsibilities do(es) the maintainer(s) have?

    • Complete control over the future direction of the project
    • Full commit access to and ownership of the GitHub repository
    • Maintaining the existing project & codebase (testing with new iOS and OS X releases, fixing any issues, etc)
    • Updating the official CocoaPod with new versions
    • Responding to GitHub Issues and Pull Requests
    • Reaping all of the praise and recognition that comes along with the above :smiley:

    I would estimate that the minimum average weekly time commitment is about 1 hour -- not very large. Of course, there's the opportunity to invest more, depending on what you want to do with the project.

    Part of this transition will be moving PureLayout to a new home in the PureLayout GitHub org.

    Please post here if you're interested or want to learn more! It would be great if you could include some background on you, as well as your familiarity/experience with PureLayout.

    I'd like to have at least one new maintainer selected by September 1, 2015.

    help wanted 
    opened by smileyborg 16
  • Animations in iOS 9 broken?

    Animations in iOS 9 broken?

    Has anyone had issues with UIView animations of PureLayout constraints with the iOS 9 beta?

    After upgrading to the beta, I noticed that every time I tried to animate a position change for certain constraints, the position change happened instantly with no animation whatsoever. This didn't happen for all constraints that I tried to animate - some animated just like on iOS 8, others did not.

    Eventually I realized that the constraints that weren't animating correctly were set up with PureLayout, while the ones that were working were hooked up in Interface Builder.

    Here's the animation code that works fine for some objects, and worked fine for everything in iOS 8:

    self.balloonConstraint.constant = -70; [UIView animateWithDuration:5.0 animations:^{ [self.balloon layoutIfNeeded]; }];

    I could just switch to using Interface Builder for these objects, but hopefully this is just a bug that will be fixed before GM - or something got changed that I'm unaware of, and I have to change a little code.

    apple-bug 
    opened by bmueller 15
  • Post install script for app extensions stopped working

    Post install script for app extensions stopped working

    The script described here https://github.com/PureLayout/PureLayout/wiki/App-Extensions used to work perfectly until some recent changes on CocoaPods. On CocoaPods 1.8.0 ~ 1.8.4 the script fails to enter the conditional block, meaning that the GCC_PREPROCESSOR_DEFINITIONS are never set.

    While debugging the script, I found out that the APPLICATION_EXTENSION_API_ONLY flag value is not set during the execution (it's blank).

    If I revert the CocoaPods version to 1.7.5, the script works fine.

    Any ideas?

    help wanted 
    opened by arctouch-yurireis 13
  • Semantic Issues

    Semantic Issues

    When building my application, I get semantic warnings similar to the following:

    'NSLayoutYAxisAnchor' is only available on iOS 9.0 or newer 'NSLayoutYAxisAnchor' is only available on iOS 9.0 or newer

    Is it possible to get rid of these warning messages? There's 24 of them every time I compile my application. I set my build target to iOS 9.0 -- not sure why this is happening.

    opened by charlie-camp 12
  • AutoPinEdgeToSuperviewEdge not working

    AutoPinEdgeToSuperviewEdge not working

    Hi,

    Since updating xcode to 6.3 and iOS to 8.3 the following constraints just aren't working for me:

    [self.prefsView autoPinEdgeToSuperviewEdge:ALEdgeTop withInset:(self.navigationController.navigationBar.frame.size.height )];
     [self.prefsView autoPinEdgeToSuperviewEdge:ALEdgeLeft];
    [self.prefsView autoPinEdgeToSuperviewEdge:ALEdgeRight];
    

    The view I'm using these on just isn't visible when these are enabled

    opened by ryderjack 12
  • Add support for Swift Package Manager

    Add support for Swift Package Manager

    I try to use swift package manager to resolve PureLayout, but a "no manifest error" occur. I wonder is is possible to support swift package manager?

    help wanted 
    opened by oopsFrogs 11
  • Dynamic cell height in pure layout

    Dynamic cell height in pure layout

    bildschirmfoto 2014-11-06 um 19 23 12

    I want the table cell to grow depending on the content. As you can see from this picture the first cell has a big gap. I pretty much used your https://github.com/smileyborg/TableViewCellWithAutoLayoutiOS8 project.

    The only thing I changed was

    titleLabel.numberOfLines = 1
    

    to

    titleLabel.numberOfLines = 0
    

    because the title may have variable length. And I get the result like you see in the picture. Any ideas whats wrong? Maybe the constrains don't find my use case?

    titleLabel.autoPinEdgeToSuperviewEdge(.Top, withInset: kLabelVerticalInsets)
    titleLabel.autoPinEdgeToSuperviewEdge(.Leading, withInset: kLabelHorizontalInsets)
    titleLabel.autoPinEdgeToSuperviewEdge(.Trailing, withInset: kLabelHorizontalInsets)
    
    bodyLabel.autoPinEdge(.Top, toEdge: .Bottom, ofView: titleLabel, withOffset: 10.0, relation: .GreaterThanOrEqual)
    
    bodyLabel.autoPinEdgeToSuperviewEdge(.Leading, withInset: kLabelHorizontalInsets)
    bodyLabel.autoPinEdgeToSuperviewEdge(.Trailing, withInset: kLabelHorizontalInsets)
    bodyLabel.autoPinEdgeToSuperviewEdge(.Bottom, withInset: kLabelVerticalInsets)
    

    any ideas?

    opened by artworkad 11
  • Allow a single view to be automatically distributed

    Allow a single view to be automatically distributed

    NSArray's autoDistributeViewsAlongAxis: requires 2 views, but the code works perfectly with just a single subview! Since the NSAssert is from the initial commit, I thought perhaps this had been an early sanity check and not a specific design decision.

    I think it might make more sense to only require a single view (or perhaps none at all, in which case the method might no-op, monad-style) so that callers don't have to check the number of items in the array and implement different functionality in the case of a single view.

    I'd be happy to add a test for the new single-view case if you're open to this patch.

    One use case is a view with a small but variable number of children, such as a toolbar of buttons.

    opened by pnc 10
  • Bump tzinfo from 1.2.5 to 2.0.5

    Bump tzinfo from 1.2.5 to 2.0.5

    Bumps tzinfo from 1.2.5 to 2.0.5.

    Release notes

    Sourced from tzinfo's releases.

    v2.0.5

    • Changed DateTime results to always use the proleptic Gregorian calendar. This affects DateTime results prior to 1582-10-15 and any arithmetic performed on the results that would produce a secondary result prior to 1582-10-15.
    • Added support for eager loading all the time zone and country data by calling either TZInfo::DataSource#eager_load! or TZInfo.eager_load!. Compatible with Ruby On Rails' eager_load_namespaces. #129.
    • Ignore the SECURITY file from Arch Linux's tzdata package. #134.

    TZInfo v2.0.5 on RubyGems.org

    v2.0.4

    • Fixed an incorrect InvalidTimezoneIdentifier exception raised when loading a zoneinfo file that includes rules specifying an additional transition to the final defined offset (for example, Africa/Casablanca in version 2018e of the Time Zone Database). #123.

    TZInfo v2.0.4 on RubyGems.org

    v2.0.3

    • Added support for handling "slim" format zoneinfo files that are produced by default by zic version 2020b and later. The POSIX-style TZ string is now used calculate DST transition times after the final defined transition in the file. #120.
    • Fixed TimeWithOffset#getlocal returning a TimeWithOffset with the timezone_offset still assigned when called with an offset argument on JRuby 9.3.
    • Rubinius is no longer supported.

    TZInfo v2.0.3 on RubyGems.org

    v2.0.2

    • Fixed 'wrong number of arguments' errors when running on JRuby 9.0. #114.
    • Fixed warnings when running on Ruby 2.8. #113.

    TZInfo v2.0.2 on RubyGems.org

    v2.0.1

    • Fixed "SecurityError: Insecure operation - require" exceptions when loading data with recent Ruby releases in safe mode. #100.
    • Fixed warnings when running on Ruby 2.7. #109.
    • Added a TZInfo::Timezone#=~ method that performs a regex match on the time zone identifier. #99.
    • Added a TZInfo::Country#=~ method that performs a regex match on the country code.

    TZInfo v2.0.1 on RubyGems.org

    v2.0.0

    Added

    • to_local and period_for instance methods have been added to TZInfo::Timezone. These are similar to utc_to_local and period_for_utc, but take the UTC offset of the given time into account.
    • abbreviation, dst?, base_utc_offset and observed_utc_offset instance methods have been added to TZInfo::Timezone, returning the abbreviation, whether daylight savings time is in effect and the UTC offset of the time zone at a specified time.
    • A TZInfo::Timestamp class has been added. It can be used with TZInfo::Timezone in place of a Time or DateTime.
    • local_time, local_datetime and local_timestamp instance methods have been added to TZInfo::Timezone. These methods construct local Time, DateTime and TZInfo::Timestamp instances with the correct UTC offset and abbreviation for the time zone.
    • Support for a (yet to be released) version 2 of tzinfo-data has been added, in addition to support for version 1. The new version will remove the (no longer needed) DateTime parameters from transition times, reduce memory consumption and improve the efficiency of loading timezone and country indexes.
    • A TZInfo::VERSION constant has been added, indicating the TZInfo version number.

    Changed

    • The minimum supported Ruby versions are now Ruby MRI 1.9.3, JRuby 1.7 (in 1.9 or later mode) and Rubinius 3.
    • Local times are now returned using the correct UTC offset (instead of using UTC). #49 and #52.
    • Local times are returned as instances of TimeWithOffset, DateTimeWithOffset or TZInfo::TimestampWithOffset. These classes subclass Time, DateTime and TZInfo::Timestamp respectively. They override the default behaviour of the base classes to return information about the observed offset at the indicated time. For example, the zone abbreviation is returned when using the %Z directive with strftime.
    • The transitions_up_to, offsets_up_to and strftime instance methods of TZInfo::Timezone now take the UTC offsets of given times into account (instead of ignoring them as was previously the case).
    • The TZInfo::TimezonePeriod class has been split into two subclasses: TZInfo::OffsetTimezonePeriod and TZInfo::TransitionsTimezonePeriod. TZInfo::OffsetTimezonePeriod is returned for time zones that only have a single offset. TZInfo::TransitionsTimezonePeriod is returned for periods that start or end with a transition.

    ... (truncated)

    Changelog

    Sourced from tzinfo's changelog.

    Version 2.0.5 - 19-Jul-2022

    • Changed DateTime results to always use the proleptic Gregorian calendar. This affects DateTime results prior to 1582-10-15 and any arithmetic performed on the results that would produce a secondary result prior to 1582-10-15.
    • Added support for eager loading all the time zone and country data by calling either TZInfo::DataSource#eager_load! or TZInfo.eager_load!. Compatible with Ruby On Rails' eager_load_namespaces. #129.
    • Ignore the SECURITY file from Arch Linux's tzdata package. #134.

    Version 2.0.4 - 16-Dec-2020

    • Fixed an incorrect InvalidTimezoneIdentifier exception raised when loading a zoneinfo file that includes rules specifying an additional transition to the final defined offset (for example, Africa/Casablanca in version 2018e of the Time Zone Database). #123.

    Version 2.0.3 - 8-Nov-2020

    • Added support for handling "slim" format zoneinfo files that are produced by default by zic version 2020b and later. The POSIX-style TZ string is now used calculate DST transition times after the final defined transition in the file. #120.
    • Fixed TimeWithOffset#getlocal returning a TimeWithOffset with the timezone_offset still assigned when called with an offset argument on JRuby 9.3.
    • Rubinius is no longer supported.

    Version 2.0.2 - 2-Apr-2020

    • Fixed 'wrong number of arguments' errors when running on JRuby 9.0. #114.
    • Fixed warnings when running on Ruby 2.8. #113.

    Version 2.0.1 - 24-Dec-2019

    • Fixed "SecurityError: Insecure operation - require" exceptions when loading data with recent Ruby releases in safe mode. #100.
    • Fixed warnings when running on Ruby 2.7. #109.
    • Added a TZInfo::Timezone#=~ method that performs a regex match on the time zone identifier. #99.
    • Added a TZInfo::Country#=~ method that performs a regex match on the country code.

    Version 2.0.0 - 26-Dec-2018

    ... (truncated)

    Commits
    • d9b289e Preparing v2.0.5.
    • 264c763 Add v0.3.61 and v1.2.10 from the 0.3 and 1.2 branches.
    • ca29f34 Fix relative path loading tests.
    • c4f177c Add a top level eager_load! method for Rails compatibility.
    • 94be919 Support preloading all data from a DataSource.
    • fe7ad26 Clarify that both files and directories are excluded.
    • d2883cf Tidy up of security file ignoring.
    • 6a4766e Merge pull request #133.
    • 5d53b59 Workaround for 'Permission denied - NUL' errors with JRuby on Windows.
    • 83450a1 ignore SECURITY file for Arch tzdata package
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Pin an edge of a view to *another* edge of its superview's safe area?

    Pin an edge of a view to *another* edge of its superview's safe area?

    Is it possible to pin one edge of a view (e.g. .top) to another edge of its superview's safe area (e.g. .bottom)?. I'd like to accomplish this behavior: someView.topAnchor.constraint(equalTo: superview.safeAreaLayoutGuide.bottomAnchor, constant: -50)

    From what I see in the PureLayout API, currently it's possible to pin only to the same edge of the superview's safe area.

    enhancement 
    opened by denjiz 1
  • Bump activesupport from 5.1.5 to 6.0.3.1

    Bump activesupport from 5.1.5 to 6.0.3.1

    Bumps activesupport from 5.1.5 to 6.0.3.1.

    Release notes

    Sourced from activesupport's releases.

    6.0.3

    In this version, we fixed warnings when used with Ruby 2.7 across the entire framework.

    Following are the list of other changes, per-framework.

    Active Support

    • Array#to_sentence no longer returns a frozen string.

      Before:

      ['one', 'two'].to_sentence.frozen?
      # => true
      

      After:

      ['one', 'two'].to_sentence.frozen?
      # => false
      

      Nicolas Dular

    • Update ActiveSupport::Messages::Metadata#fresh? to work for cookies with expiry set when ActiveSupport.parse_json_times = true.

      Christian Gregg

    Active Model

    • No changes.

    Active Record

    • Recommend applications don't use the database kwarg in connected_to

      The database kwarg in connected_to was meant to be used for one-off scripts but is often used in requests. This is really dangerous because it re-establishes a connection every time. It's deprecated in 6.1 and will be removed in 6.2 without replacement. This change soft deprecates it in 6.0 by removing documentation.

      Eileen M. Uchitelle

    • Fix support for PostgreSQL 11+ partitioned indexes.

      Sebastián Palma

    • Add support for beginless ranges, introduced in Ruby 2.7.

      Josh Goodall

    ... (truncated)
    Changelog

    Sourced from activesupport's changelog.

    Rails 6.0.3.1 (May 18, 2020)

    • [CVE-2020-8165] Deprecate Marshal.load on raw cache read in RedisCacheStore

    • [CVE-2020-8165] Avoid Marshal.load on raw cache value in MemCacheStore

    Rails 6.0.3 (May 06, 2020)

    • Array#to_sentence no longer returns a frozen string.

      Before:

      ['one', 'two'].to_sentence.frozen?
      # => true
      

      After:

      ['one', 'two'].to_sentence.frozen?
      # => false
      

      Nicolas Dular

    • Update ActiveSupport::Messages::Metadata#fresh? to work for cookies with expiry set when ActiveSupport.parse_json_times = true.

      Christian Gregg

    Rails 6.0.2.2 (March 19, 2020)

    • No changes.

    Rails 6.0.2.1 (December 18, 2019)

    • No changes.

    Rails 6.0.2 (December 13, 2019)

    • Eager load translations during initialization.

      Diego Plentz

    • Use per-thread CPU time clock on ActiveSupport::Notifications.

      George Claghorn

    Rails 6.0.1 (November 5, 2019)

    ... (truncated)
    Commits
    • 34991a6 Preparing for 6.0.3.1 release
    • 2c8fe2a bumping version, updating changelog
    • 0ad524a update changelog
    • bd39a13 activesupport: Deprecate Marshal.load on raw cache read in RedisCacheStore
    • 0a7ce52 activesupport: Avoid Marshal.load on raw cache value in MemCacheStore
    • b738f19 Preparing for 6.0.3 release
    • 509b9da Preparing for 6.0.3.rc1 release
    • 02d07cc adds missing require [Fixes #39042]
    • f2f7bcc Fix Builder::XmlMarkup lazy load in Array#to_xml
    • 320734e Merge pull request #36941 from ts-3156/master
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump nokogiri from 1.8.2 to 1.8.5

    Bump nokogiri from 1.8.2 to 1.8.5

    Bumps nokogiri from 1.8.2 to 1.8.5.

    Changelog

    Sourced from nokogiri's changelog.

    1.8.5 / 2018-10-04

    Security Notes

    [MRI] Pulled in upstream patches from libxml2 that address CVE-2018-14404 and CVE-2018-14567. Full details are available in #1785. Note that these patches are not yet (as of 2018-10-04) in an upstream release of libxml2.

    Bug fixes

    • [MRI] Fix regression in installation when building against system libraries, where some systems would not be able to find libxml2 or libxslt when present. (Regression introduced in v1.8.3.) #1722
    • [JRuby] Fix node reparenting when the destination doc is empty. #1773

    1.8.4 / 2018-07-03

    Bug fixes

    • [MRI] Fix memory leak when creating nodes with namespaces. (Introduced in v1.5.7) #1771

    1.8.3 / 2018-06-16

    Security Notes

    [MRI] Behavior in libxml2 has been reverted which caused CVE-2018-8048 (loofah gem), CVE-2018-3740 (sanitize gem), and CVE-2018-3741 (rails-html-sanitizer gem). The commit in question is here:

    https://github.com/GNOME/libxml2/commit/960f0e2

    and more information is available about this commit and its impact here:

    flavorjones/loofah#144

    This release simply reverts the libxml2 commit in question to protect users of Nokogiri's vendored libraries from similar vulnerabilities.

    If you're offended by what happened here, I'd kindly ask that you comment on the upstream bug report here:

    https://bugzilla.gnome.org/show_bug.cgi?id=769760

    Dependencies

    • [MRI] libxml2 is updated from 2.9.7 to 2.9.8

    Features

    • Node#classes, #add_class, #append_class, and #remove_class are added.
    • NodeSet#append_class is added.
    • NodeSet#remove_attribute is a new alias for NodeSet#remove_attr.
    • NodeSet#each now returns an Enumerator when no block is passed (Thanks, @​park53kr!)
    ... (truncated)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Button not working when its superview is auto centered

    Button not working when its superview is auto centered

    Hi,

    I've created a custom view that contains 2 labels and a button. When I set the custom view to be auto centered in its superview, I can no longer tap the button.

    Here's the code I'm using to init the view and add it to a view controller inside the viewDidLoad function:

    let errorView = ErrorView(frame: CGRect(x: 120, y: 150, width: 100, height: 100))
    self.view.addSubview(errorView)
    errorView.autoCenterInSuperview() // ---> This is the problematic line.
    

    This is the custom view class:

    import UIKit
    import PureLayout
    
    class ErrorView: UIView {
        
        var contentView: UIView!
        
        var titleLabel: UILabel!
        var subTitleLabel: UILabel!
        var tryAgainButton: UIButton!
        
        required init?(coder aDecoder: NSCoder) {
            super.init(coder: aDecoder)
            setup()
        }
        
        override init(frame: CGRect) {
            super.init(frame: frame)
            setup()
        }
        
        public func setup() {
            contentView = UIView()
            contentView.backgroundColor = .red
            contentView.widthAnchor.constraint(lessThanOrEqualToConstant: 300).isActive = true
            contentView.heightAnchor.constraint(lessThanOrEqualToConstant: 200).isActive = true
            self.addSubview(contentView)
            contentView.autoCenterInSuperview()
            
            titleLabel = UILabel()
            titleLabel.backgroundColor = .green
            titleLabel.font = UIFont.preferredFont(forTextStyle: .title2)
            titleLabel.adjustsFontForContentSizeCategory = true
            titleLabel.text = "Failed to load this screen"
            contentView.addSubview(titleLabel)
            titleLabel.textAlignment = .center
            titleLabel.autoAlignAxis(.vertical, toSameAxisOf: contentView)
            titleLabel.autoPinEdge(.top, to: .top, of: contentView, withOffset: 16)
            titleLabel.autoPinEdge(.left, to: .left, of: contentView, withOffset: 16)
            titleLabel.autoPinEdge(.right, to: .right, of: contentView, withOffset: -16)
            
            subTitleLabel = UILabel()
            subTitleLabel.backgroundColor = .cyan
            subTitleLabel.font = UIFont.preferredFont(forTextStyle: .body)
            subTitleLabel.adjustsFontForContentSizeCategory = true
            subTitleLabel.text = "Please contact support."
            contentView.addSubview(subTitleLabel)
            subTitleLabel.textAlignment = .center
            subTitleLabel.autoAlignAxis(.vertical, toSameAxisOf: contentView)
            subTitleLabel.autoPinEdge(.top, to: .bottom, of: titleLabel, withOffset: 16)
            subTitleLabel.autoPinEdge(.left, to: .left, of: titleLabel, withOffset: 16)
            subTitleLabel.autoPinEdge(.right, to: .right, of: titleLabel, withOffset: -16)
            
            tryAgainButton = UIButton(type: .system)
            tryAgainButton.titleLabel?.font = UIFont.preferredFont(forTextStyle: .headline)
            tryAgainButton.titleLabel?.adjustsFontForContentSizeCategory = true
            tryAgainButton.frame = CGRect(x: 0, y: 0, width: 10, height: 50)
            tryAgainButton.backgroundColor = .white
            tryAgainButton.setTitle("Try again", for: .normal)
            tryAgainButton.addTarget(self, action: #selector(buttonAction), for: .touchUpInside)
            contentView.addSubview(tryAgainButton)
            tryAgainButton.autoAlignAxis(.vertical, toSameAxisOf: contentView)
            tryAgainButton.autoPinEdge(.top, to: .bottom, of: subTitleLabel, withOffset: 16)
        }
        
        @objc func buttonAction() {
            print("****** clickable")
        }
        
    }
    

    What could be the issue here? Is this a library bug? Or did I configured anything wrong? This is how the view looks:

    Screenshot 2019-08-12 at 15 34 23

    opened by lmsmartins 3
Releases(v3.1.9)
  • v3.1.9(Jul 14, 2021)

  • 3.1.9(May 12, 2021)

  • v3.1.8(Mar 22, 2021)

    This release bumps the minimum iOS deployment target from 8.0 to 9.0 (#253) in addition to switching to runtime checking for app extensions addressed in #252.

    Source code(tar.gz)
    Source code(zip)
  • v3.1.6(Apr 25, 2020)

  • v3.1.5(Jul 23, 2019)

  • v3.1.4(Oct 27, 2018)

  • v3.1.2(Aug 28, 2018)

  • 3.1(Aug 25, 2018)

    This release has changes that support the iPhone X and safe areas.

    This hasn't had a lot of testing, but wanted to push it out to get feedback and testing.

    Source code(tar.gz)
    Source code(zip)
  • v3.0.2(Jun 11, 2016)

  • v3.0.1(Aug 31, 2015)

    This release contains no actual changes from v3.0.0 (release notes) – it exists solely to update the repository URL to the new location in the PureLayout organization (https://github.com/PureLayout/PureLayout).

    Note: the previous repository URL (https://github.com/smileyborg/PureLayout) will continue to work, as it seamlessly redirects to the new URL.

    Source code(tar.gz)
    Source code(zip)
  • v3.0.0(Aug 17, 2015)

    PureLayout v3.0.0 is a major release, with new APIs, enhancements, and other changes. The v3.0.0 release remains fully backwards compatible with Xcode 5, iOS 6, and OS X 10.7.

    Upgrading from PureLayout v2.x? Check out the migration guide.

    Breaking Changes from v2.x

    • The following class methods on UIView/NSView have been moved to NSLayoutConstraint. 1583f7b3dbbc519c327aec4c54d36fc77e085017
      • +[autoCreateConstraintsWithoutInstalling:]
      • +[autoSetPriority:forConstraints:]
      • +[autoSetIdentifier:forConstraints:]
    • The methods deprecated in PureLayout v2.0.0 have been removed entirely. 6d204083bc867b208c2ddc5d475b70a65caf9310

    Additions

    • New API to batch create, activate, and return all constraints within a block. c2bcb1f976f5b7acf52ef8fce41d0d9115d32ef9
      • +[NSLayoutConstraint autoCreateAndInstallConstraints:]
    • New API to configure an initialized view for use with auto layout (thanks @vivianforzj). e2e75ab9bcdf5b75ddeb8ac85f9f5093b980f46c
      • -[ALView configureForAutoLayout]
    • New API to align a view's axis to another view's axis with a multiplier (thanks @s0mmer). c5a4dc28a33fb2c54ad4d2e54c849e634b80acf9
      • -[ALView autoAlignAxis:toSameAxisOfView:withMultiplier:]
    • New API to pin a view's edges to its superview's edges with zero insets (thanks @pfleiner). c97a5776269d0a649a309c36cbf249ccb22b06c5
      • -[ALView autoPinEdgesToSuperviewEdges]

    Enhancements

    • Generics have been added throughout the entire codebase. b030f4f3289271a688d1f67a0fc8b43b675f6d2b bcd91bfa567a331882d712454e96a6f7940a576b 571de949d6926fac748a41a7434212e68a34d024
    • Nullability annotations have been added for all headers. b030f4f3289271a688d1f67a0fc8b43b675f6d2b
    • The methods to distribute views now support distributing an array containing a single view (thanks @pnc). a66c6205b9f43249431b0d1134a346bce9f58f58

    Fixes

    • Fixed a warning when compiling using -Wconversion. f58e4b240af1aa1f17cb5c474746a675bb23d896
    Source code(tar.gz)
    Source code(zip)
  • v2.0.6(Apr 25, 2015)

  • v2.0.4(Dec 9, 2014)

    • Enhance the autoCreateConstraintsWithoutInstalling: API to return an array of created constraints
    • Add a new API to set the size of an array of views
    • Fix a constraint exception when distributing views
    Source code(tar.gz)
    Source code(zip)
  • v2.0.3(Nov 17, 2014)

  • v2.0.2(Nov 10, 2014)

    • Use a new method to determine the UI layout direction (thanks @vytis)
    • Make activating and deactivating constraints more efficient in some cases
    Source code(tar.gz)
    Source code(zip)
  • v2.0.1(Oct 18, 2014)

    • Make the constraint identifier APIs available on Mac OS X, as long as the SDK is at least 10.10 (will work with deployment target of 10.9 or higher)
    • Fix issues with nesting constraint blocks (nested calls to autoSetPriority:, autoSetIdentifier:, etc)
    • Don't set the priority of constraints when installing them unless inside a constraints block
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Oct 16, 2014)

    PureLayout v2.0.0 is a major release, with many new features, APIs, and enhancements. The v2.0.0 release is fully backwards compatible with Xcode 5 and iOS 6 and 7 deployment targets (OS X deployment target remains at 10.7 as well).

    Upgrading from PureLayout v1.x? Check out the migration guide.

    Looking to take it for a test drive? Check out the brand new demos in the example project! (Download as .zip here)

    Changes include:

    • Full support for new features in iOS 8 SDK (first baseline and all layout margin attributes, active & identifier properties on NSLayoutConstraint)
    • New API to constrain views to the iOS 8 layout margin attributes
    • New API to prevent automatic installation of constraints
    • Improved Swift compatibility using a new combined enum type ALAttribute
    • Modified existing APIs to distribute views for naming & type consistency
    • Deprecation of the constraint removal API on UIView
    • Internal enhancements and optimizations
    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Sep 7, 2014)

    • Add a new API to allow distributing views with fixed spacing but without matching all their sizes (relying on each view's intrinsic content size instead)
    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Jun 24, 2014)

Owner
PureLayout
PureLayout
⚓️ Declarative, extensible, powerful Auto Layout

EasyAnchor ❤️ Support my apps ❤️ Push Hero - pure Swift native macOS application to test push notifications PastePal - Pasteboard, note and shortcut m

Khoa 449 Nov 10, 2022
Auto Layout (and manual layout) in one line.

Auto Layout (and manual layout) in one line. Quick Look view.bb.centerX().below(view2).size(100) It’s equivalent to iOS 9 API: view.centerXAnchor.cons

Javier Zhang 74 Oct 19, 2022
Auto Layout made easy with the Custom Layout.

Auto Layout made easy with the Custom Layout. Getting started CocoaPods CocoaPods is a dependency manager for Cocoa projects. You can install it with

Malith Nadeeshan 1 Jan 16, 2022
Concise Auto Layout API to chain programmatic constraints while easily updating existing constraints.

Concise API for Auto Layout. SnapLayout extends UIView and NSView to deliver a list of APIs to improve readability while also shortening constraint co

Satinder Singh 11 Dec 17, 2021
Written in pure Swift, QuickLayout offers a simple and easy way to manage Auto Layout in code.

QuickLayout QuickLayout offers an additional way, to easily manage the Auto Layout using only code. You can harness the power of QuickLayout to align

Daniel Huri 243 Oct 28, 2022
Declarative Auto Layout in Swift, clean and simple

Tails Tails is a take on declarative Auto Layout. If you don't like typing (like me), it might be your kind of thing! Tails is written in Swift and cu

Nick Tymchenko 17 Jan 31, 2019
Very simple swipe-to-dismiss, supporting Auto Layout and dynamic heights

PanelPresenter Add swipe-dismiss logic to your view controller, supporting Auto Layout and dynamic heights. Installation Add this package to your proj

Pim 3 Aug 23, 2022
A custom layout built on top of SwiftUI's Layout API that lays elements out in multiple lines. Similar to flex-wrap in CSS, CollectionViewFlowLayout.

WrapLayout A custom layout built on top of SwiftUI's Layout API that lays elements out in multiple lines. Similar to flex-wrap in CSS, CollectionViewF

Hiroshi Kimura 6 Sep 27, 2022
Harness the power of AutoLayout NSLayoutConstraints with a simplified, chainable and expressive syntax. Supports iOS and OSX Auto Layout

Masonry Masonry is still actively maintained, we are committed to fixing bugs and merging good quality PRs from the wider community. However if you're

null 18k Jan 5, 2023
Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS/CALayer]

Extremely Fast views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainabl

layoutBox 2.1k Dec 22, 2022
Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast

Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS/CALayer]

layoutBox 2.1k Jan 2, 2023
An Impressive Auto Layout DSL for iOS, tvOS & OSX. & It is written in pure swift.

KVConstraintKit KVConstraintKit is a DSL to make easy & impressive Auto Layout constraints on iOS, tvOS & OSX with Swift Installation Using CocoaPods

Keshav Vishwkarma 90 Sep 1, 2022
MyLayout is a simple and easy objective-c framework for iOS view layout

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 UITableView UICollectionView RTL

欧阳大哥2013 4.2k Dec 30, 2022
Random-Colors-iOS - Random colors generator app with auto layout

Random Colors Random colors generator app with auto layout Demo demo.mp4 Depende

Adem Özcan 8 Mar 23, 2022
Swifty DSL for programmatic Auto Layout in iOS

WWLayout Easy to write auto layout constraints, with minimal extensions to standard namespaces. Feature Highlights Easy to use, readable API Backwards

WW Tech 49 Oct 2, 2022
A declarative Auto Layout DSL for Swift :iphone::triangular_ruler:

Cartography ?? ?? Using Cartography, you can set up your Auto Layout constraints in declarative code and without any stringly typing! In short, it all

Robb Böhnke 7.3k Jan 4, 2023
Lightweight Swift framework for Apple's Auto-Layout

I am glad to share with you a lightweight Swift framework for Apple's Auto-Layout. It helps you write readable and compact UI code using simple API. A

null 349 Dec 20, 2022
A compact but full-featured Auto Layout DSL for Swift

Mortar allows you to create Auto Layout constraints using concise, simple code statements. Use this: view1.m_right |=| view2.m_left - 12.0 Instead of:

Jason Fieldman 83 Jan 29, 2022
Auto Layout In Swift Made Easy

Swiftstraints Swiftstraints can turn verbose auto-layout code: let constraint = NSLayoutConstraint(item: blueView, attr

null 119 Jan 29, 2022