SDAutoLayout icon indicating copy to clipboard operation
SDAutoLayout copied to clipboard

为什么我的widthRatioToView,heightRatioToView完全没用?

Open hms111111 opened this issue 7 years ago • 0 comments

imageV.sd_layout.topSpaceToView(self, 0) .leftEqualToView(self) .widthIs(Main_Screen_Width) .heightIs(HEIGHT(self)*3/4);

    BTNView.sd_layout.topSpaceToView(imageV, 0)
    .leftSpaceToView(imageV, 0)
    .widthRatioToView(imageV, 1)
    .heightRatioToView(imageV, 1/3);

(lldb) po imageV <UIImageView: 0x7fbdfb4c5870; frame = (0 0; 320 112.5); userInteractionEnabled = NO; layer = <CALayer: 0x7fbdfb4c5970>>

(lldb) po BTNView <UIView: 0x7fbdfb4c5f40; frame = (0 0; 0 0); layer = <CALayer: 0x7fbdfb4c5b10>>

hms111111 avatar Apr 19 '18 11:04 hms111111