How can I update this constraint code for iPhone X and up? This code doesn't support the new sizes of views and I feel as if it could be altered just a bit to fit the new specifications. Should an update be made in the function that holds addConstraint
?
@implementation UIView (JSQMessages)
- (void)jsq_pinSubview:(UIView *)subview toEdge:(NSLayoutAttribute)attribute
{
[self addConstraint:[NSLayoutConstraint constraintWithItem:self
attribute:attribute
relatedBy:NSLayoutRelationEqual
toItem:subview
attribute:attribute
multiplier:1.0f
constant:0.0f]];
}
- (void)jsq_pinAllEdgesOfSubview:(UIView *)subview
{
[self jsq_pinSubview:subview toEdge:NSLayoutAttributeBottom];
[self jsq_pinSubview:subview toEdge:NSLayoutAttributeTop];
[self jsq_pinSubview:subview toEdge:NSLayoutAttributeLeading];
[self jsq_pinSubview:subview toEdge:NSLayoutAttributeTrailing];
}
@end