Skip to content

Commit

Permalink
Merge pull request #165 from yourCozy/feat/dam
Browse files Browse the repository at this point in the history
fix: logout, activityRecommendVC layout
  • Loading branch information
choidam authored Oct 4, 2020
2 parents f3d0f93 + 5e14bea commit f34cc3d
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="wordWrap" numberOfLines="100" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NuN-Kz-aCx">
<rect key="frame" x="24" y="667" width="366" height="106.5"/>
<rect key="frame" x="24" y="667" width="366" height="115"/>
<attributedString key="attributedText">
<fragment>
<string key="content">홍철책방에 다시 찾아온 감각적인 전시를 소개합니
Expand All @@ -197,13 +197,13 @@
</string>
<attributes>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" size="16" name="NanumSquareRoundL"/>
<font key="NSFont" metaFont="system" size="16"/>
</attributes>
</fragment>
<fragment content="고 힘차게 광야에서 것은 뿐이다.">
<attributes>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" size="16" name="NanumSquareRoundL"/>
<font key="NSFont" metaFont="system" size="16"/>
<paragraphStyle key="NSParagraphStyle" alignment="justified" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="10" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
Expand Down Expand Up @@ -253,6 +253,7 @@
<constraint firstItem="CDt-1G-I2n" firstAttribute="top" secondItem="pBb-Lz-fOD" secondAttribute="bottom" constant="24" id="dT2-Un-WuZ"/>
<constraint firstItem="RsL-HZ-K1B" firstAttribute="centerX" secondItem="RGt-Ah-zCi" secondAttribute="centerX" id="fdE-x5-Njs"/>
<constraint firstAttribute="trailing" secondItem="h8a-Iw-USE" secondAttribute="trailing" id="fiV-A2-5c8"/>
<constraint firstItem="6CF-xq-qUg" firstAttribute="top" secondItem="RGt-Ah-zCi" secondAttribute="bottom" constant="113" id="ixZ-Gc-ogD"/>
<constraint firstItem="6CF-xq-qUg" firstAttribute="leading" secondItem="pXx-Cm-M1i" secondAttribute="leading" constant="24" id="jMp-fr-0CD"/>
<constraint firstItem="9il-n9-3Ez" firstAttribute="leading" secondItem="LeW-Fk-Tpx" secondAttribute="trailing" constant="20" id="kPh-Nl-4TS"/>
<constraint firstItem="gKO-gn-yls" firstAttribute="top" secondItem="LeW-Fk-Tpx" secondAttribute="bottom" constant="14" id="kd0-lq-oSn"/>
Expand Down Expand Up @@ -290,6 +291,8 @@
<navigationItem key="navigationItem" id="yuh-to-Qr8"/>
<size key="freeformSize" width="414" height="1000"/>
<connections>
<outlet property="commentTableView" destination="fSM-dQ-n2Z" id="Dcf-Id-j8C"/>
<outlet property="hashtagTopConstraint" destination="ixZ-Gc-ogD" id="mzY-mh-vLF"/>
<outlet property="hashtagView" destination="6bk-mQ-03R" id="KlC-Xz-Vzo"/>
<outlet property="lblActivityIntroduction" destination="NuN-Kz-aCx" id="EqE-fF-LTR"/>
<outlet property="lblDday" destination="r1b-FY-SYC" id="Lyz-Zt-OrR"/>
Expand Down
38 changes: 10 additions & 28 deletions cozy/cozy/Resource/Storyboard/Mypage/Logout.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -26,34 +26,34 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="TrI-Xx-Rw2">
<rect key="frame" x="138" y="141" width="139" height="100"/>
<rect key="frame" x="138" y="97" width="139" height="100"/>
<constraints>
<constraint firstAttribute="height" constant="100" id="hta-Wk-47E"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="내 계정정보" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SEv-fA-rXL">
<rect key="frame" x="24" y="302" width="77" height="18"/>
<rect key="frame" x="24" y="258" width="77" height="18"/>
<fontDescription key="fontDescription" name="NanumSquareRoundB" family="NanumSquareRound" pointSize="16"/>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="linelightgray" translatesAutoresizingMaskIntoConstraints="NO" id="uxS-9I-MrK">
<rect key="frame" x="0.0" y="333" width="414" height="3"/>
<rect key="frame" x="0.0" y="289" width="414" height="3"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="이름" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tI5-8t-gwP">
<rect key="frame" x="24" y="384" width="26" height="15.5"/>
<rect key="frame" x="24" y="340" width="26" height="15.5"/>
<fontDescription key="fontDescription" name="NanumSquareRoundB" family="NanumSquareRound" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="비밀번호" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CUb-M1-UnL">
<rect key="frame" x="24" y="435.5" width="51" height="15.5"/>
<rect key="frame" x="24" y="391.5" width="51" height="15.5"/>
<fontDescription key="fontDescription" name="NanumSquareRoundB" family="NanumSquareRound" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hDL-Zx-5jA">
<rect key="frame" x="86" y="372" width="303" height="40"/>
<rect key="frame" x="86" y="328" width="303" height="40"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="코지" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yvo-FH-8NP">
<rect key="frame" x="20" y="12" width="25.5" height="16"/>
Expand All @@ -70,7 +70,7 @@
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Azp-NT-Abc">
<rect key="frame" x="86" y="423.5" width="303" height="40"/>
<rect key="frame" x="86" y="379.5" width="303" height="40"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="***********" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vy3-Ar-Er9">
<rect key="frame" x="20" y="12" width="54.5" height="16"/>
Expand All @@ -87,21 +87,21 @@
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="로그아웃" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PEu-Qu-g2g">
<rect key="frame" x="24" y="536" width="58.5" height="18"/>
<rect key="frame" x="24" y="492" width="58.5" height="18"/>
<fontDescription key="fontDescription" name="NanumSquareRoundB" family="NanumSquareRound" pointSize="16"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7Ya-wV-equ">
<rect key="frame" x="365" y="534" width="21" height="22"/>
<rect key="frame" x="365" y="490" width="21" height="22"/>
<color key="tintColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" image="arrowshape.turn.up.right.fill" catalog="system"/>
<connections>
<action selector="logout:" destination="Sje-JQ-KQf" eventType="touchUpInside" id="y0r-mS-Ayp"/>
</connections>
</button>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="linelightgray" translatesAutoresizingMaskIntoConstraints="NO" id="J4F-3P-GgO">
<rect key="frame" x="0.0" y="567" width="414" height="3"/>
<rect key="frame" x="0.0" y="523" width="414" height="3"/>
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="exO-la-4xA"/>
Expand Down Expand Up @@ -149,24 +149,6 @@
</objects>
<point key="canvasLocation" x="597.10144927536237" y="32.8125"/>
</scene>
<!--Main Nav Controller-->
<scene sceneID="YhL-px-3rX">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="arX-kh-mbQ" customClass="MainNavController" customModule="cozy" customModuleProvider="target" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="TeD-bK-1sH">
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="Sje-JQ-KQf" kind="relationship" relationship="rootViewController" id="K7c-Tq-7DP"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="lR3-x0-BTu" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-313.04347826086956" y="32.8125"/>
</scene>
</scenes>
<resources>
<image name="arrowshape.turn.up.right.fill" catalog="system" width="128" height="106"/>
Expand Down
27 changes: 25 additions & 2 deletions cozy/cozy/Source/ViewControllers/Mypage/VC/LogoutVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ class LogoutVC: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()

setNav()
setLabelStyle()
setLogoutData()
// Do any additional setup after loading the view.
}

func setLabelStyle() {
Expand All @@ -43,6 +42,30 @@ class LogoutVC: UIViewController {
view3.backgroundColor = UIColor.veryLightPinkFour
}

func setNav() {
self.navigationItem.setHidesBackButton(true, animated: true)
self.navigationController?.navigationBar.tintColor = UIColor.gray
let backButton = UIBarButtonItem(image: UIImage(named: "iconbefore"), style: .plain, target: self, action: #selector(goback))
self.navigationItem.leftBarButtonItem = backButton

let rightSwipe = UISwipeGestureRecognizer(target: self, action: #selector(rightSwipeAction(swipe:)))
rightSwipe.direction = .right
self.view.addGestureRecognizer(rightSwipe)
}

@objc func rightSwipeAction(swipe: UISwipeGestureRecognizer) {
switch swipe.direction.rawValue {
case 1:
self.goback()
default:
break
}
}

@objc func goback() {
self.navigationController?.popViewController(animated: true)
}

@IBAction func logout(_ sender: Any) {

let alert = UIAlertController(title: "로그아웃 하시겠어요?", message: "메인 페이지로 돌아갑니다 :)", preferredStyle: UIAlertController.Style.alert)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,17 @@ class ActivityRecommendVC: UIViewController {
@IBOutlet var lblFixedCollection: [UILabel]!
@IBOutlet var lblNotFixedCollection: [UILabel]!

@IBOutlet weak var commentTableView: UITableView!

@IBOutlet weak var hashtagTopConstraint: NSLayoutConstraint!

override func viewDidLoad() {
super.viewDidLoad()

setNav()

subImgCollectionView.delegate = self
subImgCollectionView.dataSource = self

// commentTableView.delegate = self
// commentTableView.dataSource = self

setUI()
getActivityDetailData()

setHashtagStyle()
setLabelStyle()

}

private func getActivityDetailData() {
Expand Down Expand Up @@ -81,6 +76,7 @@ class ActivityRecommendVC: UIViewController {

if self.displayDetailList.count == 0 {
self.subImgCollectionView.isHidden = true
self.hashtagTopConstraint.constant = 20
}

self.displayDetailList.append(image1)
Expand Down Expand Up @@ -144,6 +140,11 @@ class ActivityRecommendVC: UIViewController {
}
}

func setUI() {
subImgCollectionView.delegate = self
subImgCollectionView.dataSource = self
}

func setNav() {
self.navigationItem.setHidesBackButton(true, animated: true)
self.navigationController?.navigationBar.tintColor = UIColor.gray
Expand Down

0 comments on commit f34cc3d

Please sign in to comment.