Open CLQ201010 opened 5 years ago
self.goBtn.sd_layout .rightSpaceToView(self.contentView, 16) .centerYEqualToView(self.contentView) .widthIs(40) .heightIs(50); self.goBtn.imageView.sd_layout .topEqualToView(self.goBtn) .centerXEqualToView(self.goBtn) .widthIs(25) .heightIs(25); self.goBtn.titleLabel.sd_layout .leftEqualToView(self.goBtn) .topSpaceToView(self.goBtn.imageView, 5) .rightEqualToView(self.goBtn) .autoHeightRatio(0);
goBtn的高度已经固定了,imageView高度为25,但是titleLabel是高度自适应,如果文字过多,就会出现重叠,应该把.autoHeightRatio(0)改为.bottomEqualToView(self.goBtn)