CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✗ |
| LangLanguage | Obj-CObjective C |
| License | MIT |
| ReleasedLast Release | Oct 2017 |
Maintained by Anton Bukov.
Backport of Apple NSLayoutAnchor API to iOS7 and some missings like sizeAnchor and edgesAnchor.
###Backported all default anchor methods:
view.leadingAnchorview.trailingAnchorview.leftAnchorview.rightAnchorview.topAnchorview.bottomAnchorview.widthAnchorview.heightAnchorview.centerXAnchorview.centerYAnchorview.firstBaselineAnchorview.lastBaselineAnchor###Additional implemented anchors:
view.sizeAnchorview.edgesAnchorWith some additional methods on anchors:
anchor.withTopAnchoranchor.withBottomAnchoranchor.withLeadingAnchoranchor.withTrailingAnchoredgesAnchor.withoutTopAnchoredgesAnchor.withoutBottomAnchoredgesAnchor.withoutLeadingAnchoredgesAnchor.withoutTrailingAnchorUsage example:
#import <MissingAnchors/MissingAnchors.h>
...
[view1.edgesAnchor constraintsEqualToConstant:UIEdgeInsetsMake(10, 20, 30, 40)].active = YES;
[view2.topAnchor.withBottomAnchor constraintsEqualToConstant:UIEdgeInsetsMake(10, 0, 30, 0)].active = YES;
[view3.edgesAnchor.withoutTopAnchor constraintsEqualToConstant:UIEdgeInsetsMake(0, 20, 30, 40)].active = YES;###Modern active property:
#import <MissingAnchors/MissingAnchors.h>
...
@[
[view1.topAnchor constraintEqualToAnchor:self.view.topAnchor constant:10],
[view1.leftAnchor constraintEqualToAnchor:self.view.leftAnchor constant:20],
[view1.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor constant:-30],
[view1.rightAnchor constraintEqualToAnchor:self.view.rightAnchor constant:-40],
].active = YES;MissingAnchors is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod 'MissingAnchors'
pod 'MissingAnchors/NSLayoutAnchor' # if you need a backport of NSLayoutAnchor to iOS 7Anton Bukov, [email protected]
MissingAnchors is available under the MIT license. See the LICENSE file for more info.