Akiva Leffert
cd49354220
Factor redundant constraint relation code into RelationTarget protocol
...
Instead of having a copy of each method for each type, factor the
constraint target logic to use a new protocol RelationTarget.
Note that since RelationTarget returns a new ConstraintItem and the
constructor for ConstraintItem is internal, a user will be unable to
erroneously extend the protocol.
LayoutSupport should really be a RelationTarget too, but it seems you
can't extenda a protocol to implement another protocol.
2015-10-14 20:17:59 -04:00
Akiva Leffert
a5be9d646b
Introduce FloatConvertible to reduce relation boilerplate
2015-10-12 00:57:59 -04:00
Tadeas Kriz
e84f9bc1c3
Add compiler condition to remove warnings when not using legacy deployment.
2015-10-04 23:17:48 +02:00
Tadeas Kriz
2afe4d47ec
Add call to activateConstraints on iOS8+ and fix build issues for OS X.
2015-10-04 23:04:16 +02:00
Ryan Britton
7fc0537c13
Added tvOS checks so the iOS paths are used rather than OS X
2015-09-24 21:37:33 -07:00
Akiva Leffert
16090bde5d
Add support for the iOS 9 Layout Anchor API.
2015-09-23 14:14:16 -04:00
Robert Payne
ba26480317
Fixed iOS 9 layout guides, and better support for legacy platforms
2015-09-22 19:38:50 +12:00
Robert Payne
de954c0c12
Merge branch 'develop' of github.com:SnapKit/SnapKit into develop
...
# Conflicts:
# Source/ConstraintAttributes.swift
2015-09-19 12:37:23 +12:00
Robert Payne
210bab97c7
Enforce availablility for iOS 8.0+ Attributes
2015-09-19 12:21:42 +12:00
Suyeol Jeon
ba03f22eb8
Add availability check for iOS 8 and OS X 10.10 methods.
...
- `NSLayoutConstraint.activateConstraints(_:)`
- `NSLayoutConstraint.deactivateConstraints(_:)`
2015-09-18 13:18:28 +09:00
Suyeol Jeon
8e6219ef86
Add availability check for iOS 8 attributes.
2015-09-14 22:31:55 +09:00
Robert Payne
446e5c5758
Merged in 0.13.0 changes
2015-07-30 19:35:48 +12:00
Ben Jones
88021b8280
Change += and -= to use inPlace ops and += should be union
2015-07-30 19:30:56 +12:00
Ben Jones
5afd216e21
Handle new NSLayoutAttribute FirstBaseline that is introduced in OS X 10.11 for CGPoint or EdgeInsets
2015-07-30 19:30:56 +12:00
Ben Jones
c6b3ecaad8
Fixes for Swift 2.0 b2
2015-07-30 19:30:56 +12:00
Robert Payne
c1de30ac5c
Updated for Swift 2.0
2015-07-30 19:30:56 +12:00
Robert Payne
37b18d44de
`insets` is now `inset` and accepts EdgeInsets as well single values
2015-07-30 19:01:33 +12:00
Robert Payne
9ef9ae6f9f
Improve debugging and allow width/height constraints to be installed on from view
2015-07-30 18:49:47 +12:00
Robert Payne
3d9a449e37
Merge pull request #122 from alexanderjarvis/master
...
Fix crash
2015-07-04 10:41:36 +12:00
Alex Jarvis
8269bcea63
Fix crash
2015-06-30 14:25:25 +01:00
Robert Payne
6f0584f855
Update ViewController+SnapKit.swift
...
Removed unecessary typealias
2015-06-03 15:34:53 +12:00
Robert Payne
6252444966
Added support for view controller layout guides
2015-05-30 19:54:43 +12:00
Robert Payne
62b058de00
Remove unecessary API prefixes
2015-05-30 19:45:39 +12:00
Robert Payne
57baa96dc7
Removed 'final' declaration in attempt to fix odd crashes
2015-04-23 00:31:40 +12:00
Robert Payne
e2112b3ab8
Loosen API a bit to better allow chaining order
2015-04-16 10:07:51 +12:00
Robert Payne
931eb01de9
Ensure ConcreteConstraint cannot be subclassed
2015-04-15 23:32:47 +12:00
Robert Payne
5d5bc09b25
Use an abstract superclass for Constraint rather than protocol
2015-04-15 23:31:03 +12:00
Robert Payne
16f6fa789a
Fix OS X complaining about edge insets
2015-04-15 23:30:46 +12:00
Robert Payne
d9424975d4
Fix OS X compiles
2015-04-15 23:17:20 +12:00
Robert Payne
51662d58bb
Snap is now SnapKit
2015-04-15 23:07:50 +12:00
Robert Payne
529e7588aa
Update fatal errors
2015-04-12 23:44:32 +12:00
Robert Payne
2b00e7b50c
Refactor Constraint -> ConcreteConstraint & Add Updaters!
2015-04-12 23:32:03 +12:00
Robert Payne
c9b89ad974
Refactoring & Documentation
2015-04-12 22:21:02 +12:00
Robert Payne
7cb3a61c14
Revert insets to inset
2015-04-12 18:35:29 +12:00
Robert Payne
b0c5280e16
Rename insets -> inset and deprecate insets
2015-04-12 18:27:52 +12:00
Robert Payne
18851b7ecd
Fix up interface layout direction
2015-04-12 18:27:36 +12:00
Robert Payne
997e0e5970
Remove config and simplify offset/constant differences
2015-04-12 17:54:11 +12:00
Robert Payne
93febd2e5e
Update comments
2015-04-12 17:53:48 +12:00
Robert Payne
a6790f13c7
Add missing right property from ConstraintBuilderExtendable
2015-04-12 17:53:32 +12:00
Robert Payne
509d648818
Updated API & Copyrights
2015-04-12 00:04:36 +12:00
Robert Payne
931d6ca7ec
Initial Implementation of protocol API
2015-04-11 23:39:12 +12:00
Robert Payne
846d767cbb
Tidy up how constants are made
2015-04-11 22:16:50 +12:00
Robert Payne
03ba3d603e
Added better offset/constant maths
2015-04-11 22:10:02 +12:00
Robert Payne
8f70c8290a
Added configuration and InterfaceLayoutDirection
2015-04-11 22:09:44 +12:00
Robert Payne
8b8372c43d
Ensure OS X target up to date
2015-04-11 21:47:27 +12:00
Robert Payne
3c3a76cf6e
Added activate/deactivate
2015-04-11 21:44:46 +12:00
Robert Payne
ded4778181
Fix debugging compile error
2015-04-11 21:44:39 +12:00
Robert Payne
7205e043e8
Updated debugging
2015-04-11 21:27:46 +12:00
Robert Payne
08ff0472b2
Added better debugging support
...
Support for snp_label and better descriptions when printing LayoutConstraint's
2015-04-11 20:33:13 +12:00
Robert Payne
d5e5cf1296
Tidy up priority medium for OS X
2015-04-11 19:44:11 +12:00