I am attempting to set my views top constraint (y-value) as a percentage (multiplier) of the superview's height. I need to use a reference rather than value constraint to account for the devices rotation.
The equivalent of what I am trying in non auto-layout is the following:
[self.labelView setFrame:CGRectMake(0, self.frame.size.height * 0.8, self.frame.size.width, 20)];
What I am trying to achieve is setting view's TOP constraint to 80% of superviews height like the following:
[self.labelView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.contentView.mas_height).multipliedBy(0.8);
make.left.and.right.equalTo(self.contentView);
make.height.equalTo(20);
}];
However, this approach does not work. Is this possible with the Masonry library?