Skip to content

Commit

Permalink
iOS9 support for guide layouts.
Browse files Browse the repository at this point in the history
  • Loading branch information
lisbakke committed Sep 24, 2015
1 parent 4bc78aa commit 84eec85
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions FLKAutoLayout/UIView+FLKAutoLayoutPredicate.m
Expand Up @@ -46,8 +46,11 @@ - (NSLayoutConstraint*)flk_applyPredicate:(FLKAutoLayoutPredicate)predicate toVi
}

- (UIView*)commonSuperviewWithView:(UIView*)view {
Class layoutGuideGlass = NSClassFromString(@"UILayoutGuide");
if (!view) {
return self;
} else if (layoutGuideGlass && [view isKindOfClass:[layoutGuideGlass class]]) {
return self.superview;
} else if (self.superview == view) {
return view;
} else if (self == view.superview) {
Expand Down

0 comments on commit 84eec85

Please sign in to comment.