调节了个播房播放音乐的显示位置

This commit is contained in:
fengshuo
2022-05-13 14:44:21 +08:00
parent 965320ed00
commit fc61e458e6
4 changed files with 7 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 B

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -396,6 +396,9 @@ UIKIT_EXTERN NSString * kRoomBackMusicPlayMusicOrderKey;
_playOrderButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_playOrderButton setImage:[UIImage imageNamed:@"room_music_small_player_order"] forState:UIControlStateNormal];
[_playOrderButton setImage:[UIImage imageNamed:@"room_music_small_player_single"] forState:UIControlStateSelected];
NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults];
NSInteger type = [defaults integerForKey:kRoomBackMusicPlayMusicOrderKey];
_playOrderButton.selected = type == 1;
[_playOrderButton addTarget:self action:@selector(playOrderButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _playOrderButton;

View File

@@ -704,9 +704,10 @@
if (currentUserModel) {
if (!self.musicEnterButton.superview) {
[self addSubview:self.musicEnterButton];
CGFloat topOffY = self.delegate.getRoomInfo.type == RoomType_Anchor ? (kNavigationHeight+ 4 + 22 + 18) : (kNavigationHeight+ 4);
[self.musicEnterButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(0).offset(8);
make.top.mas_equalTo(kNavigationHeight+4);
make.top.mas_equalTo(topOffY);
make.width.mas_equalTo(79);
make.height.mas_equalTo(22);
}];
@@ -1331,9 +1332,10 @@
if (currentUserModel) {
if (!self.musicEnterButton.superview) {
[self addSubview:self.musicEnterButton];
CGFloat topOffY = self.delegate.getRoomInfo.type == RoomType_Anchor ? (kNavigationHeight+ 4 + 22 + 18) : (kNavigationHeight+ 4);
[self.musicEnterButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(0).offset(8);
make.top.mas_equalTo(kNavigationHeight+4);
make.top.mas_equalTo(topOffY);
make.width.mas_equalTo(79);
make.height.mas_equalTo(22);
}];