diff --git a/YuMi/E-P/Moments/Views/EPSignatureColorGuideView.m b/YuMi/E-P/Moments/Views/EPSignatureColorGuideView.m index c204af3..82dfa7c 100644 --- a/YuMi/E-P/Moments/Views/EPSignatureColorGuideView.m +++ b/YuMi/E-P/Moments/Views/EPSignatureColorGuideView.m @@ -50,8 +50,9 @@ [self addSubview:self.contentContainer]; [self.contentContainer mas_makeConstraints:^(MASConstraintMaker *make) { - make.center.equalTo(self); + make.top.equalTo(self).offset(100); make.leading.trailing.equalTo(self).inset(30); + make.bottom.lessThanOrEqualTo(self).offset(-30); }]; @@ -64,7 +65,7 @@ [self.contentContainer addSubview:self.subtitleLabel]; [self.subtitleLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.equalTo(self.titleLabel.mas_bottom).offset(12); + make.top.equalTo(self.titleLabel.mas_bottom).offset(8); make.centerX.equalTo(self.contentContainer); make.leading.trailing.equalTo(self.contentContainer).inset(20); }]; @@ -80,7 +81,7 @@ [self.contentContainer addSubview:self.selectedColorView]; [self.selectedColorView mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.equalTo(self.subtitleLabel.mas_bottom).offset(30); + make.top.equalTo(self.subtitleLabel.mas_bottom).offset(20); make.centerX.equalTo(self.contentContainer); make.height.mas_equalTo(60); make.leading.trailing.equalTo(self.contentContainer).inset(40); @@ -89,15 +90,16 @@ [self.contentContainer addSubview:self.colorWheelView]; [self.colorWheelView mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.equalTo(self.selectedColorView.mas_bottom).offset(30); + make.top.equalTo(self.selectedColorView.mas_bottom).offset(20); make.centerX.equalTo(self.contentContainer); - make.size.mas_equalTo(CGSizeMake(360, 360)); + CGFloat wheelSize = MIN(300, [UIScreen mainScreen].bounds.size.width - 80); + make.size.mas_equalTo(CGSizeMake(wheelSize, wheelSize)); }]; [self.contentContainer addSubview:self.confirmButton]; [self.confirmButton mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.equalTo(self.colorWheelView.mas_bottom).offset(50); + make.top.equalTo(self.colorWheelView.mas_bottom).offset(30); make.leading.trailing.equalTo(self.contentContainer).inset(20); make.height.mas_equalTo(56); make.bottom.equalTo(self.contentContainer); @@ -259,8 +261,9 @@ - (EPEmotionColorWheelView *)colorWheelView { if (!_colorWheelView) { _colorWheelView = [[EPEmotionColorWheelView alloc] init]; - _colorWheelView.radius = 100.0; - _colorWheelView.buttonSize = 54.0; + CGFloat wheelSize = MIN(300, [UIScreen mainScreen].bounds.size.width - 80); + _colorWheelView.radius = wheelSize / 3.0; + _colorWheelView.buttonSize = 48.0; __weak typeof(self) weakSelf = self; _colorWheelView.onColorTapped = ^(NSString *hexColor, NSInteger index) {