Skip to content

Commit

Permalink
Merge pull request #397 from wakmusic/feature/player_spacing
Browse files Browse the repository at this point in the history
🔀 :: 미니플레이어 간격조정
  • Loading branch information
KangTaeHoon authored Dec 2, 2023
2 parents e492cee + 241dc5f commit 986aafb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
<capability name="collection view cell content view" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand All @@ -24,20 +24,21 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="캐롤" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5ur-ig-foP">
<rect key="frame" x="16" y="31.666666666666671" width="80" height="17"/>
<rect key="frame" x="12" y="5" width="84" height="70"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
<color key="textColor" red="0.2784313725" green="0.3294117647" blue="0.4039215686" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="5ur-ig-foP" firstAttribute="centerY" secondItem="gZD-6H-uqh" secondAttribute="centerY" id="1eH-Cc-aTc"/>
<constraint firstItem="6bv-vR-KlZ" firstAttribute="height" secondItem="gZD-6H-uqh" secondAttribute="height" multiplier="48:80" id="7tX-Nc-nrS"/>
<constraint firstItem="6bv-vR-KlZ" firstAttribute="centerY" secondItem="gZD-6H-uqh" secondAttribute="centerY" id="DyU-PI-80b"/>
<constraint firstItem="5ur-ig-foP" firstAttribute="top" secondItem="gZD-6H-uqh" secondAttribute="top" constant="5" id="EvW-Z0-1sE"/>
<constraint firstItem="6bv-vR-KlZ" firstAttribute="leading" secondItem="5ur-ig-foP" secondAttribute="trailing" constant="4" id="QU4-Cp-SEb"/>
<constraint firstItem="5ur-ig-foP" firstAttribute="leading" secondItem="gZD-6H-uqh" secondAttribute="leading" constant="16" id="faK-47-EcZ"/>
<constraint firstItem="5ur-ig-foP" firstAttribute="leading" secondItem="gZD-6H-uqh" secondAttribute="leading" constant="12" id="faK-47-EcZ"/>
<constraint firstAttribute="trailing" secondItem="6bv-vR-KlZ" secondAttribute="trailing" constant="16" id="uhj-gl-Dva"/>
<constraint firstAttribute="bottom" secondItem="5ur-ig-foP" secondAttribute="bottom" constant="5" id="zDg-wn-GOK"/>
</constraints>
</collectionViewCellContentView>
<connections>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ extension RecommendPlayListCell {
func update(model: RecommendPlayListEntity) {
let attributedString = NSMutableAttributedString(
string: model.title,
attributes: [.font: DesignSystemFontFamily.Pretendard.medium.font(size: 14.2),
attributes: [.font: DesignSystemFontFamily.Pretendard.medium.font(size: 14),
.foregroundColor: DesignSystemAsset.GrayColor.gray600.color,
.kern: -0.5]
)
titleStringLabel.attributedText = attributedString

titleStringLabel.numberOfLines = 3

logoImageView.kf.setImage(
with: WMImageAPI.fetchRecommendPlayListWithRound(id: model.key,version: model.image_round_version).toURL,
placeholder: nil,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,30 +131,30 @@ private extension MiniPlayerView {
$0.top.equalToSuperview().offset(7)
$0.bottom.equalToSuperview().offset(-7)
$0.left.equalToSuperview().offset(20)
$0.right.equalTo(playButton.snp.left).offset(-12)
$0.right.equalTo(playButton.snp.left).offset(-16)
}
}

private func configurePlayButton() {
playButton.snp.makeConstraints {
$0.centerY.equalToSuperview()
$0.right.equalTo(nextButton.snp.left).offset(-20)
$0.right.equalTo(nextButton.snp.left).offset(-16)
$0.width.height.equalTo(32)
}
}

private func configureNextButton() {
nextButton.snp.makeConstraints {
$0.centerY.equalToSuperview()
$0.right.equalTo(playlistButton.snp.left).offset(-20)
$0.right.equalTo(playlistButton.snp.left).offset(-16)
$0.width.height.equalTo(32)
}
}

private func configurePlaylistButton() {
playlistButton.snp.makeConstraints {
$0.centerY.equalToSuperview()
$0.right.equalToSuperview().offset(-16)
$0.right.equalToSuperview().offset(-20)
$0.width.height.equalTo(32)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public final class PlaylistView: UIView {

lazy var titleLabel = WMLabel(text: "재생목록", textColor: DesignSystemAsset.GrayColor.gray900.color, font: .t5(weight: .medium), alignment: .center, lineHeight: UIFont.WMFontSystem.t5().lineHeight, kernValue: -0.5)

lazy var countLabel = WMLabel(text: "재생목록", textColor: DesignSystemAsset.GrayColor.gray900.color, font: .t4(weight: .bold), alignment: .center, lineHeight: UIFont.WMFontSystem.t4().lineHeight, kernValue: -0.5)
lazy var countLabel = WMLabel(text: "재생목록", textColor: DesignSystemAsset.PrimaryColor.point.color, font: .t4(weight: .bold), alignment: .center, lineHeight: UIFont.WMFontSystem.t4().lineHeight, kernValue: -0.5)

internal lazy var editButton = RectangleButton(type: .custom).then {
$0.setBackgroundColor(.clear, for: .normal)
Expand Down Expand Up @@ -72,7 +72,7 @@ public final class PlaylistView: UIView {
internal lazy var miniPlayerStackView = UIStackView().then {
$0.axis = .horizontal
$0.distribution = .fillEqually
$0.spacing = (APP_WIDTH() < 375) ? 10 : 20
$0.spacing = (APP_WIDTH() < 375) ? 10 : 16
}

internal lazy var totalPlayTimeView = UIView().then {
Expand Down Expand Up @@ -236,7 +236,7 @@ private extension PlaylistView {

miniPlayerContentView.snp.makeConstraints {
$0.top.bottom.equalToSuperview()
$0.horizontalEdges.equalToSuperview().inset(UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 16))
$0.horizontalEdges.equalToSuperview().inset(UIEdgeInsets(top: 0, left: 16, bottom: 0, right: 20))
}

thumbnailImageView.snp.makeConstraints {
Expand All @@ -249,9 +249,7 @@ private extension PlaylistView {
}

miniPlayerStackView.snp.makeConstraints {
let spacing: CGFloat = (APP_WIDTH() < 375) ? 15 : 27
$0.top.bottom.equalToSuperview()
$0.left.equalTo(thumbnailImageView.snp.right).offset(spacing)
$0.right.equalToSuperview()
}

Expand All @@ -260,7 +258,6 @@ private extension PlaylistView {
miniPlayerStackView.addArrangedSubview(playButton)
miniPlayerStackView.addArrangedSubview(nextButton)
miniPlayerStackView.addArrangedSubview(shuffleButton)

}

private func configreHomeIndicatorBackgroundView() {
Expand Down

0 comments on commit 986aafb

Please sign in to comment.