File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -137,8 +137,11 @@ - (BOOL)hasBeenInstalled {
137137- (void )setSecondViewAttribute : (id )secondViewAttribute {
138138 if ([secondViewAttribute isKindOfClass: NSValue .class]) {
139139 if ([self .firstViewAttribute.item isKindOfClass: MASLayoutGuide.class]) {
140- _secondViewAttribute = [[MASViewAttribute alloc ] initWithView: self .firstViewAttribute.view
141- layoutAttribute: self .firstViewAttribute.layoutAttribute];
140+ NSLayoutAttribute layoutAttribute = self.firstViewAttribute .layoutAttribute ;
141+ if (layoutAttribute != NSLayoutAttributeWidth && layoutAttribute != NSLayoutAttributeHeight) {
142+ _secondViewAttribute = [[MASViewAttribute alloc ] initWithView: self .firstViewAttribute.view
143+ layoutAttribute: layoutAttribute];
144+ }
142145 }
143146
144147 [self setLayoutConstantWithValue: secondViewAttribute];
You can’t perform that action at this time.
0 commit comments