Build 1 scene, let AutoLayoutMagic generate the constraints for you!

Overview

Auto Layout Magic

Create 1 scene, let Auto Layout Magic generate the constraints for you

Hello friends,

We've all been there. You have an app supporting iOS 8, and can't use stack views. Therefore you have to make hundreds of constraints to make your view presentable across multiple iOS devices. A very tedious task taking up hours of your time. So why not hire a magician to do it for you?

This is my first open source project, which I am excited to share with you!

Auto Layout Magic will enable you to design on one screen, and the tool will generate constraints for you!

Swift 2 and 3 support!

There is full support for Swift 3, thanks to the open source community! There is also legacy support for Swift 2 by using the Swift_2 branch!

Usage example

Check out this video, for an overview of how to use the tool!

Target Screen

Before Auto Layout Magic, your view will look like this across different devices

After Auto Layout Magic, your constraints will be created for you, and your view looks great across all iOS devices!

Installation

OS X - Requires XCode

Fork or clone the repository, open the project in XCode, build and run the tool. Once it has been built you can run it at any time as an app. This app will eventually be uploaded to the app store as a Developer Tool.

Release History

  • 1.1
    • Added support for Swift 3. Made a Swift_2 branch for legacy support
  • 1.0
    • Released Auto Layout Magic to the open source community

Meta

Akorda – @AkordaDev[email protected]

Distributed under the MIT license. See LICENSE for more information.

https://github.com/akordadev/AutoLayoutMagic

Hope you enjoy, looking forward to working with the community to make this tool great for everyone!

<3 Akorda

Check the Wiki for more info!

Comments
  • Better README.md

    Better README.md

    As I mentioned on Awesome-iOS' #820 issue, your project needs an improvement on the README.md. The repo On/Off Button had the same problem, so you can follow their fix and see how to improve the README.md

    Let me know if you need any help! 😃

    opened by lfarah 6
  • Make a beta release of app for swift 3.0 support

    Make a beta release of app for swift 3.0 support

    Please make a beta release of this app with swift 3.0 support like https://github.com/gauravds/AutoLayoutMagic/releases. You can pick up thebuild app from here.

    People generally don't want to compile and build the tool and then use.

    Another good suggestion that in XCode 8 we could make an xcode plugin for adding constrain in storyboard. before XCode 8 there is Alcatraz but that is history, just we could make an xcode plugin and publish to app store.

    Looking forward to your reply.

    opened by gauravds 2
  • Crash on currentView.rect!.width

    Crash on currentView.rect!.width

    This line is causing crash when using storyboard to apply autolayouts attributeData["multiplier"] = "(currentView.rect!.width)/(currentView.parentView!.rect!.width)"

    Method Name: private func generateConstraints(currentView: View, constraintParentNode: NSXMLElement)

    it causes crash in both cases when using aspect ratio or not.

    opened by aliakber945 2
  • Xcode unable to open the project after placing the contrains using AutoLayout Magic.

    Xcode unable to open the project after placing the contrains using AutoLayout Magic.

    I placed the constrains by giving the storyboard path , but after placing the constrains xcode is unable to open the project, xcode is keep crashing. I am lucky because i have backup , please let me know how can i resolve that.

    opened by mahesh576 0
  • Build support for an XCode plugin

    Build support for an XCode plugin

    Suggested by @gauravds commented on Dec 14, 2016 ..... "Another good suggestion that in XCode 8 we could make an xcode plugin for adding constrain in storyboard. before XCode 8 there is Alcatraz but that is history, just we could make an xcode plugin and publish to app store." ....

    opened by akordadev 2
Releases(1.1.1)
Owner
Matt
Sr. Director of Engineering, Gamer, Musician!
Matt
iOS constraint maker you always wanted. Write constraints like sentences in English. Simple

YeahLayout iOS constraint maker you always wanted. Write constraints like sentences in English. Simple. Intuitive. No frightening abstractions. One fi

Андрей Соловьев 1 Jan 10, 2022
UIView category which makes it easy to create layout constraints in code

FLKAutoLayout FLKAutoLayout is a collection of categories on UIView which makes it easy to setup layout constraints in code. FLKAutoLayout creates sim

Florian Kugler 1.5k Nov 24, 2022
Swift microframework for declaring Auto Layout constraints functionally

Relayout Relayout is a Swift microframework to make using Auto Layout easier with static and dynamic layouts. Why? If you want to build a UI using App

Steve Streza 560 Nov 19, 2022
Minimal AutoLayout convenience layer. Program constraints succinctly.

MiniLayout Minimal AutoLayout convenience layer. Program constraints succinctly. Usage Put label over textField // using MiniLayout: view.constrain(la

Yonat Sharon 8 Jul 7, 2021
In this repository I've learned how to use the layout as well as alignment and constraints.

Auto Layout Our Goal At the moment, our app only looks good on the canvas dimension that we’ve selected. If you run the app on screens with different

Pedro Couventaris Daspett 1 Apr 23, 2022
A simple integrated version of iOS 13 Compositional Layout, modified into a way similar to Functional Programming to generate UICollectionViewCompositionalLayout.

WWCompositionalLayout A simple integrated version of iOS 13 Compositional Layout, modified into a way similar to Functional Programming to generate UI

William-Weng 1 Jul 4, 2022
A tool that generate code for Swift projects, designed to improve the maintainability of UIColors

SwiftColorGen A tool that generate code for Swift projects, designed to improve the maintainability of UIColors. Please notice, this tool still under

Fernando del Rio 150 Oct 23, 2022
An example project showing how to use `overrideUserInterfaceStyle` to build an in-app light/dark mode switch

OverrideDarkMode A sample project to show how using overrideUserInterfaceStyle enables having a dark / light mode switch directly in the app, while st

Zouhair Mahieddine 1 Jan 19, 2022
How to build and sign your iOS application using Azure DevOps

How to build and sign your iOS application using Azure DevOps Sample source code

null 0 Dec 29, 2021
NStack is a SwiftUI view that allows you to hoist navigation state into a Coordinator

An NStack allows you to manage SwiftUI navigation state with a single stack property. This makes it easy to hoist that state into a high-level view, such as a coordinator. The coordinator pattern allows you to write isolated views that have zero knowledge of their context within the navigation flow of an app.

John Patrick Morgan 469 Dec 27, 2022
Compose is a library that helps you compose complex and dynamic views.

Compose is a data driven library that will help compose your complex and dynamic Views. It helps you create complex and dynamic Views using easy and s

OLX Brasil 123 Jun 9, 2021
This library allows you to make any UIView tap-able like a UIButton.

UIView-TapListnerCallback Example To run the example project, clone the repo, and run pod install from the Example directory first. Installation UIVie

wajeehulhassan 8 May 13, 2022
iOS App that helps you breath properly.

Breathing App iOS App that helps you breath properly. I created this iOS app in my Intro to iOS Develepmont class at Hunter College. I am not a profes

Kevin Salamanca 0 Dec 24, 2021
An iOS application enables you explore art works provided by DeviartArt.com with high quality UX.

Iris.iOS Iris is a model mobile application based on iOS. It provides basic functions allow users to explore on DeviantArt and check Daily Arts, Notif

Xueliang Chen 63 Dec 13, 2022
Using the UIKitChain framework, You can create a UIKit component in one line of code.

Using the UIKitChain framework, You can create a UIKit component in one line of code. Installation CocoaPods CocoaPods is a dependency manager for Coc

Malith Nadeeshan 1 Sep 1, 2022
Flixtor-iOS - iOS streaming app inspired by Netflix that allows you to watch any film and series

Flixtor-iOS iOS streaming app inspired by Netflix that allows you to watch any f

Kevin Liu 0 Jan 14, 2022
An open source package for as-you-type formatting in SwiftUI.

DiffableTextViews An open source package for as-you-type formatting in SwiftUI. Features Feature Description ⌨️ Responsive Formats text as you type ??

Oscar Byström Ericsson 46 Dec 5, 2022
Enables you to hide ur UIViews and make them screen/screen shot proof. objective c/c++ only

SecureView Enables you to hide ur UIViews and make them screen/screen shot proof. objective c/c++ only Usage UIWindow* mainWindow; - (void) setup {

Red16 6 Oct 13, 2022
UIKit Practice Project – Simple app to store names along with photos of people you've met

People UIKit Practice Project #10 – Simple app to store names along with photos of people you've met Cool Features Light & dark mode support Responsiv

foxster.mp4 2 Nov 28, 2022