礼物面板字体及图片大小调整
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
@property (nonatomic, strong) UIButton *giftButton;
|
||||
///分割线
|
||||
@property (nonatomic, strong) UIView *devideView;
|
||||
///分割线
|
||||
@property (nonatomic, strong) UIView *bottomDevideView;
|
||||
///互动
|
||||
@property (nonatomic, strong) UIButton *interactButton;
|
||||
///轮播图
|
||||
@@ -44,6 +46,7 @@
|
||||
[self addSubview:self.devideView];
|
||||
[self addSubview:self.interactButton];
|
||||
[self addSubview:self.cycleScrollView];
|
||||
[self addSubview:self.bottomDevideView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
@@ -54,13 +57,13 @@
|
||||
[self.giftButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(16);
|
||||
make.centerY.mas_equalTo(self);
|
||||
make.width.mas_equalTo(30);
|
||||
make.width.mas_equalTo(40);
|
||||
}];
|
||||
|
||||
[self.interactButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self);
|
||||
make.left.mas_equalTo(self.devideView.mas_right).mas_offset(8);
|
||||
make.width.mas_equalTo(30);
|
||||
make.width.mas_equalTo(40);
|
||||
}];
|
||||
|
||||
[self.devideView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -69,10 +72,17 @@
|
||||
make.width.mas_equalTo(1);
|
||||
make.height.mas_equalTo(10);
|
||||
}];
|
||||
|
||||
[self.bottomDevideView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self);
|
||||
make.left.right.mas_equalTo(0);
|
||||
make.height.mas_equalTo(1);
|
||||
}];
|
||||
|
||||
[self.cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(-16);
|
||||
make.centerY.mas_equalTo(self);
|
||||
make.width.mas_equalTo(60);
|
||||
make.width.mas_equalTo(70);
|
||||
make.height.mas_equalTo(30);
|
||||
}];
|
||||
}
|
||||
@@ -102,8 +112,8 @@
|
||||
}
|
||||
sender.selected = YES;
|
||||
self.interactButton.selected = NO;
|
||||
sender.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightSemibold];
|
||||
self.interactButton.titleLabel.font = [UIFont systemFontOfSize:13];
|
||||
sender.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold];
|
||||
self.interactButton.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
}
|
||||
|
||||
- (void)interactButtonAction:(UIButton *)sender {
|
||||
@@ -114,8 +124,8 @@
|
||||
}
|
||||
sender.selected = YES;
|
||||
self.giftButton.selected = NO;
|
||||
sender.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightSemibold];
|
||||
self.giftButton.titleLabel.font = [UIFont systemFontOfSize:13];
|
||||
sender.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold];
|
||||
self.giftButton.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
}
|
||||
|
||||
#pragma mark - setter
|
||||
@@ -133,7 +143,7 @@
|
||||
- (UIButton *)giftButton {
|
||||
if (!_giftButton) {
|
||||
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
button.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightSemibold];
|
||||
button.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold];
|
||||
[button addTarget:self action:@selector(giftButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[button setTitle:@"送礼" forState:UIControlStateNormal];
|
||||
[button setTitleColor:[ThemeColor secondTextColor] forState:UIControlStateNormal];
|
||||
@@ -147,7 +157,7 @@
|
||||
- (UIButton *)interactButton {
|
||||
if (!_interactButton) {
|
||||
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
button.titleLabel.font = [UIFont systemFontOfSize:13];
|
||||
button.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
[button addTarget:self action:@selector(interactButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[button setTitle:@"互动" forState:UIControlStateNormal];
|
||||
[button setTitleColor:[ThemeColor secondTextColor] forState:UIControlStateNormal];
|
||||
@@ -165,14 +175,19 @@
|
||||
return _devideView;
|
||||
}
|
||||
|
||||
- (UIView *)bottomDevideView {
|
||||
if (!_bottomDevideView) {
|
||||
_bottomDevideView = [[UIView alloc] init];
|
||||
_bottomDevideView.backgroundColor = UIColorRGBAlpha(0xffffff, 0.1);
|
||||
}
|
||||
return _bottomDevideView;
|
||||
}
|
||||
|
||||
- (SDCycleScrollView *)cycleScrollView {
|
||||
if (!_cycleScrollView) {
|
||||
_cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:nil];
|
||||
_cycleScrollView.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter;
|
||||
_cycleScrollView.currentPageDotColor = [UIColor whiteColor];
|
||||
_cycleScrollView.pageDotColor = [UIColor colorWithWhite:1 alpha:0.15];
|
||||
_cycleScrollView.currentPageDotImage = [UIImage imageNamed:@"room_activity_banner_select"];
|
||||
_cycleScrollView.pageDotImage = [UIImage imageNamed:@"room_activity_banner_normal"];
|
||||
_cycleScrollView.showPageControl = NO;
|
||||
_cycleScrollView.backgroundColor = [UIColor colorWithWhite:1 alpha:0.00];
|
||||
_cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFit;
|
||||
_cycleScrollView.pageControlBottomOffset = -10;
|
||||
|
Reference in New Issue
Block a user