Skip to content

Commit

Permalink
➕ [Add] TagCVC : tagLayout 추가 #5
Browse files Browse the repository at this point in the history
  • Loading branch information
seondal committed Dec 23, 2021
1 parent 26a6892 commit 9e48d78
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 13 deletions.
Binary file not shown.
9 changes: 5 additions & 4 deletions DalTube/DalTube/Home/TagCollectionViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class TagCollectionViewCell: UICollectionViewCell {

static let identifier : String = "TagCollectionViewCell"

@IBOutlet weak var tagLayout: UIView!
@IBOutlet weak var tagLabel: UILabel!

override func awakeFromNib() {
Expand All @@ -19,10 +20,10 @@ class TagCollectionViewCell: UICollectionViewCell {
}

func setLayout() {
tagLabel.layer.cornerRadius = 17
tagLabel.layer.borderWidth = 1
tagLabel.layer.borderColor = UIColor(red: 212, green: 212, blue: 212, alpha: 1).cgColor
tagLabel.layer.backgroundColor = UIColor(red: 242, green: 242, blue: 242, alpha: 1).cgColor
tagLayout.layer.cornerRadius = 17
tagLayout.layer.borderWidth = 1
tagLayout.layer.borderColor = UIColor(red: 212, green: 212, blue: 212, alpha: 1).cgColor
tagLayout.layer.backgroundColor = UIColor(red: 242, green: 242, blue: 242, alpha: 1).cgColor
}

func setData(appName: String) {
Expand Down
30 changes: 21 additions & 9 deletions DalTube/DalTube/Home/TagCollectionViewCell.xib
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,34 @@
<rect key="frame" x="0.0" y="0.0" width="100" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="이어서 시청하기" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gap-JX-9dv">
<rect key="frame" x="6" y="17" width="89" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Igd-J2-HtY">
<rect key="frame" x="0.0" y="0.0" width="100" height="50"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uNO-ha-VjG">
<rect key="frame" x="29" y="15" width="36" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="uNO-ha-VjG" firstAttribute="centerX" secondItem="Igd-J2-HtY" secondAttribute="centerX" id="XDx-e9-Uvs"/>
<constraint firstItem="uNO-ha-VjG" firstAttribute="centerY" secondItem="Igd-J2-HtY" secondAttribute="centerY" id="qIg-aQ-2P4"/>
</constraints>
</view>
</subviews>
</view>
<viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/>
<constraints>
<constraint firstItem="gap-JX-9dv" firstAttribute="centerY" secondItem="ZTg-uK-7eu" secondAttribute="centerY" id="GIC-Hb-mgj"/>
<constraint firstItem="gap-JX-9dv" firstAttribute="centerX" secondItem="ZTg-uK-7eu" secondAttribute="centerX" id="mnX-Pl-Smc"/>
<constraint firstAttribute="trailing" secondItem="Igd-J2-HtY" secondAttribute="trailing" id="Psg-eb-TDF"/>
<constraint firstAttribute="bottom" secondItem="Igd-J2-HtY" secondAttribute="bottom" id="SwU-Sb-F2c"/>
<constraint firstItem="Igd-J2-HtY" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="eiM-zN-ZJ0"/>
<constraint firstItem="Igd-J2-HtY" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="fNd-mr-cd0"/>
</constraints>
<size key="customSize" width="62" height="51"/>
<connections>
<outlet property="tagLabel" destination="gap-JX-9dv" id="fTF-SI-Bkg"/>
<outlet property="tagLabel" destination="uNO-ha-VjG" id="O8y-bE-QEC"/>
<outlet property="tagLayout" destination="Igd-J2-HtY" id="uBD-Xp-Cuk"/>
</connections>
<point key="canvasLocation" x="144.92753623188406" y="82.366071428571431"/>
</collectionViewCell>
Expand Down

0 comments on commit 9e48d78

Please sign in to comment.