Manuscript alternatives and similar libraries
Based on the "Layout" category.
Alternatively, view Manuscript alternatives based on common mentions on social networks and blogs.
-
Masonry
Harness the power of AutoLayout NSLayoutConstraints with a simplified, chainable and expressive syntax. Supports iOS and OSX Auto Layout -
PureLayout
The ultimate API for iOS & OS X Auto Layout — impressively simple, immensely powerful. Objective-C and Swift compatible. -
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 UITableView UICollectionView RTL -
PinLayout
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] -
FlexLayout
FlexLayout adds a nice Swift interface to the highly optimized facebook/yoga flexbox implementation. Concise, intuitive & chainable syntax. -
Luminous
Luminous provides you a lot of information about the system and a lot of handy methods to quickly get useful data on the iOS platform. -
MisterFusion
MisterFusion is Swift DSL for AutoLayout. It is the extremely clear, but concise syntax, in addition, can be used in both Swift and Objective-C. Support Safe Area and Size Class. -
ManualLayout
✂ Easy to use and flexible library for manually laying out views and layers for iOS and tvOS. Supports AsyncDisplayKit. -
QuickLayout
Written in pure Swift, QuickLayout offers a simple and easy way to manage Auto Layout in code. -
MondrianLayout
🏗 A way to build AutoLayout rapidly than using InterfaceBuilder(XIB, Storyboard) in iOS. -
Framezilla
DISCONTINUED. Elegant library that wraps working with frames with a nice chaining syntax. -
BBLocationManager
A Location Manager for easily implementing location services & geofencing in iOS. Ready for iOS 11.
InfluxDB - Purpose built for real-time analytics at any scale.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Manuscript or a related project?
README
It's like AutoLayoutKit but written in Swift. For pure Swift projects. And it's super simple.
Features
- [x] concise, simple and convenient API
- [x] raw AutoLayout power
- [x] no black magic involved
- [x] fully documented
- [x] completely unit-tested
Have a look at the [Changelog](CHANGELOG.md) for more details.
Requirements
- iOS 8.0+
- Xcode 8.x
- Swift 3.1
Bonus: Support for iOS 7.0+ and/or tvOS
Although the cocoapods isn't able to install Manuscript for your iOS 7.0+ app or for your tvOS app (yet), you can use still Manuscript. Just follow the 'manual' installation or add Manuscript as a framework project to your workspace (that's what I do).
What it looks like
Manuscript.layout(myButton) { c in
c.set(.Height, to: 60.0)
c.set(.Width, to: 60.0)
c.make(.Bottom, equalTo: self.view, s: .Bottom, minus: 10.0)
c.make(.CenterX, equalTo: self.view, s: .CenterX)
}
Usage
A few examples on how to use Manuscript.
Center and set size
Center a UIView 'childView' in self.view and make it 30 by 30 in size
Manuscript.layout(childView) { c in
c.make(.CenterX, equalTo: view, s: .CenterX)
c.make(.CenterY, equalTo: view, s: .CenterY)
c.set(.Width, to: 30.0)
c.set(.Height, to: 30.0)
}
The same, but using the convenience methods
Manuscript.layout(childView) { c in
c.centerIn(view)
c.setSize(CGSize(width: 30.0, height: 30.0))
}
Align all edges of a view to a superview
Align a UIView 'container' to all edges of self.view
Manuscript.layout(container) { c in
c.make(.Left, equalTo: view, s: .Left)
c.make(.Right, equalTo: view, s: .Right)
c.make(.Top, equalTo: view, s: .Top)
c.make(.Bottom, equalTo: view, s: .Bottom)
}
The same, but using the convenience methods
Manuscript.layout(container) { c in
c.alignAllEdges(to: view)
}
Align all sides with insets
Align a UIView 'container' to all edges of self.view and leave a 30 point margin around the container.
Manuscript.layout(container) { c in
c.make(.Left, equalTo: view, s: .Left, plus: 30.0)
c.make(.Right, equalTo: view, s: .Right, minus: 30.0)
c.make(.Top, equalTo: view, s: .Top, plus: 30.0)
c.make(.Bottom, equalTo: view, s: .Bottom, minus: 30.0)
}
The same, but using convenience methods.
Manuscript.layout(container) { c in
c.alignAllEdges(to: view, withInsets: UIEdgeInsets(top: 30.0, left: 30.0, bottom: 30.0, right: 30.0))
}
Use LayoutGuides
Make use of the LayoutGuides provided by UIViewController.
Manuscript.layout(container) { c in
c.make(.Left, equalTo: view, s: .Left)
c.make(.Right, equalTo: view, s: .Right)
c.make(.Top, equalTo: topLayoutGuide, s: .Baseline)
c.make(.Bottom, equalTo: bottomLayoutGuide, s: .Baseline)
}
Hairlines
There is a utility method to create hairlines which takes the screen scale into account.
Manuscript.layout(mySeparatorLine) { c in
c.make(.Left, equalTo: view, s: .Left)
c.make(.Right, equalTo: view, s: .Right)
c.make(.Top, equalTo: topLayoutGuide, s: .Baseline)
// sets the .Height to 1.0 on non-retina displays and to 0.5 on retina displays
c.makeHorizontalHairline()
}
Work with the created Layout Constraints
The functions make
and set
return a tuple of type LayoutItem
which translates to
(constraint: NSLayoutConstraint?, targetItem: UIView?)
. The 'constraint' is the created
NSLayoutConstraint
, the 'targetItem' is the view to which the NSLayoutConstraint
was added. It
is the nearest common superview of the UIView
s involved.
Manuscript.layout(container) { c in
leftConstaint = c.make(.Left, equalTo: view, s: .Left).constraint
rightConstaint = c.make(.Right, equalTo: view, s: .Right).constraint
topConstaint = c.make(.Top, equalTo: topLayoutGuide, s: .Baseline).constraint
bottomConstaint = c.make(.Bottom, equalTo: bottomLayoutGuide, s: .Baseline).constraint
}
Afterwards, just modify the constraint's constant and apply the changes (this is plain AutoLayout).
UIView.animateWithDuration(0.6) { in
topConstraint?.constant = 100
view.layoutIfNeeded()
}
Convenience Methods
The convenience methods return arrays of the mentioned tuples. These will be dictionaries or tuples in the future as well to provide easier access to the created constraints. Until then, check the code for the order of the returned constraints.
Installation
As for now, you can use Carthage or CocoaPods to install Manuscript using a dependency manager or do it manually.
Carthage
To integrate Manuscript into your Xcode project using Carthage, specify it in your Cartfile
:
github "floriankrueger/Manuscript"
If you need to support Swift 2.3 then please use the last compatible version 2.1.0
github "floriankrueger/Manuscript" == 2.1.0
If you need to support Swift 3.0 then please use the last compatible version 3.0.1
github "floriankrueger/Manuscript" == 3.0.1
If your Swift 3.1 compiler isn't compatible with the framework binary from the github release then please use the following command to build Manuscript yourself:
carthage bootstrap Manuscript --no-use-binaries
CocoaPods
Make sure your Podfile
contains all of the following lines.
use_frameworks!
platform :ios, '8.0'
pod 'Manuscript'
Then run pod install
.
Manually
To do it 'by hand' take the following files and add them to your project:
Source/Manuscript.swift
Source/LayoutProxy.swift
License
Manuscript is released under the [MIT License](LICENSE.md).
*Note that all licence references and agreements mentioned in the Manuscript README section above
are relevant to that project's source code only.