Skip to content

Commit

Permalink
Merge pull request TeamDooRiBon#185 from mini-min/feature/174-illust
Browse files Browse the repository at this point in the history
[DESIGN] ๋ณด๋“œ ๋ถ€๋ถ„ ์ผ๋Ÿฌ์ŠคํŠธ ์ถ”๊ฐ€
  • Loading branch information
mini-min committed Jul 17, 2021
2 parents 92011e4 + e6c5ec6 commit 75c1386
Show file tree
Hide file tree
Showing 29 changed files with 314 additions and 188 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "iconBoardAimActiveImg.png",
"scale" : "1x",
"idiom" : "universal"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"scale" : "1x",
"idiom" : "universal",
"filename" : "iconBoardCheckActiveImg.png"
},
{
"filename" : "[email protected]",
"scale" : "2x",
"idiom" : "universal"
},
{
"scale" : "3x",
"idiom" : "universal",
"filename" : "[email protected]"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "iconBoardGoalActiveImg.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"scale" : "3x",
"idiom" : "universal"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "iconBoardRoleActiveImg.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"scale" : "3x",
"idiom" : "universal",
"filename" : "[email protected]"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 11 additions & 4 deletions DooRiBon/DooRiBon/Sources/Base/Board/BoardViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import UIKit
struct BoardPopupData {
var title: String
var description: String
var illust: String
}

// ํƒœ๊ทธ
Expand Down Expand Up @@ -58,10 +59,13 @@ class BoardViewController: UIViewController {
description: "์ด๋ฒˆ ์—ฌํ–‰์—์„œ ๊ผญ ํ™•์ธํ•ด์•ผ\nํ•˜๋Š” ๊ฒƒ๋“ค์„ ๋ฏธ๋ฆฌ ๊ณต์œ ํ•ด์š”")
]
let popupData = [
BoardPopupData(title: "์—ฌํ–‰ ๋ชฉํ‘œ", description: "์ด๋ฒˆ ์—ฌํ–‰์˜ ๋ชฉํ‘œ๋ฅผ ํ•จ๊ป˜ ๊ณต์œ ํ•˜์„ธ์š”!"),
BoardPopupData(title: "๊ผญ ์•Œ์•„์ค˜", description: "์ด๋ฒˆ ์—ฌํ–‰์— ํ•จ๊ป˜ํ•˜๋Š” ์‚ฌ๋žŒ๋“ค์—๊ฒŒ\n๋‚˜์— ๋Œ€ํ•ด ๊ผญ ์•Œ๋ฆฌ๊ณ  ์‹ถ์€ ๊ฒƒ์„ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”!"),
BoardPopupData(title: "์—ญํ•  ๋ถ„๋‹ด", description: "์ด๋ฒˆ ์—ฌํ–‰์—์„œ ๋‚˜๋Š” ์ด๋Ÿฐ ์—ญํ• ์„ ๋‹ด๋‹นํ• ๊ฒŒ!"),
BoardPopupData(title: "์ฒดํฌ๋ฆฌ์ŠคํŠธ", description: "์ค€๋น„๋Š” ์ฒ ์ €ํ•˜๊ฒŒ! ํ•„์š”ํ•œ ๊ฒƒ์„ ๋ฏธ๋ฆฌ ์ฒดํฌํ•˜์„ธ์š”"),
BoardPopupData(title: "์—ฌํ–‰ ๋ชฉํ‘œ", description: "์ด๋ฒˆ ์—ฌํ–‰์˜ ๋ชฉํ‘œ๋ฅผ ํ•จ๊ป˜ ๊ณต์œ ํ•˜์„ธ์š”!", illust: "iconBoardGoalActiveImg"),
BoardPopupData(title: "๊ผญ ์•Œ์•„์ค˜", description: """
์ด๋ฒˆ ์—ฌํ–‰์— ํ•จ๊ป˜ํ•˜๋Š” ์‚ฌ๋žŒ๋“ค์—๊ฒŒ
๋‚˜์— ๋Œ€ํ•ด ๊ผญ ์•Œ๋ฆฌ๊ณ  ์‹ถ์€ ๊ฒƒ์„ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”!
""", illust: "iconBoardAimActiveImg"),
BoardPopupData(title: "์—ญํ•  ๋ถ„๋‹ด", description: "์ด๋ฒˆ ์—ฌํ–‰์—์„œ ๋‚˜๋Š” ์ด๋Ÿฐ ์—ญํ• ์„ ๋‹ด๋‹นํ• ๊ฒŒ!", illust: "iconBoardRoleActiveImg"),
BoardPopupData(title: "์ฒดํฌ๋ฆฌ์ŠคํŠธ", description: "์ค€๋น„๋Š” ์ฒ ์ €ํ•˜๊ฒŒ! ํ•„์š”ํ•œ ๊ฒƒ์„ ๋ฏธ๋ฆฌ ์ฒดํฌํ•˜์„ธ์š”", illust: "iconBoardCheckActiveImg"),
]

private var selectedData: DummyDataModel? {
Expand Down Expand Up @@ -368,6 +372,8 @@ extension BoardViewController: UITableViewDelegate, BoardSectionHeaderViewDelega
boardPopupView
.setTitle(popupData[selectedTagIndex].title)
.setDescription(popupData[selectedTagIndex].description)
.setIllust(popupData[selectedTagIndex].illust)

.present { event in
if event == .confirm {
self.postTripBoard(contents: self.contents, groupId: self.thisID, tag: description)
Expand Down Expand Up @@ -402,6 +408,7 @@ extension BoardViewController: UITableViewDelegate, BoardSectionHeaderViewDelega
boardPopupView
.setTitle(self.popupData[self.selectedTagIndex].title)
.setDescription(self.popupData[self.selectedTagIndex].description)
.setIllust(self.popupData[self.selectedTagIndex].illust)
.setTextView(boardData.content)
.present { event in
if event == .confirm {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
<constraint firstAttribute="width" constant="68" id="czH-pE-2yI"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="์—ฌํ–‰ ๋ชฉํ‘œ๋ฅผ ๊ณต์œ ํ•˜์„ธ์š”!" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QbC-ah-Gq1">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="์—ฌํ–‰ ๋ชฉํ‘œ๋ฅผ ๊ณต์œ ํ•˜์„ธ์š”!" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QbC-ah-Gq1">
<rect key="frame" x="2" y="185" width="316" height="20.5"/>
<fontDescription key="fontDescription" name="SpoqaHanSansNeo-Medium" family="Spoqa Han Sans Neo" pointSize="16"/>
<color key="textColor" name="gray5"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BUF-6t-Mcj">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BUF-6t-Mcj">
<rect key="frame" x="2" y="211.5" width="316" height="30.5"/>
<string key="text">์ด๋ฒˆ ์—ฌํ–‰์—์„œ ์–ด๋–ค ๊ฒƒ์„
์–ป๊ณ  ์‹ถ์€์ง€ ์ž‘์„ฑํ•ด๋ณด์„ธ์š”</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
<rect key="frame" x="18" y="4" width="284" height="73"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="์ œ์ฃผ๋„ ํ•œ๋ผ์‚ฐ ๋“ฑ์‚ฐํ•˜๊ธฐ! ์•„์นจ์— ์ผ์ฐ ์ผ์–ด๋‚˜์„œ ๊ผญ ๊ฐˆ๊ฑฐ์•ผ ํ•œ๋ผ์‚ฐ.... " lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vo5-cM-2cL">
<rect key="frame" x="16" y="14" width="195" height="35.333333333333336"/>
<rect key="frame" x="16" y="14" width="205" height="32.666666666666664"/>
<fontDescription key="fontDescription" name="SpoqaHanSansNeo-Medium" family="Spoqa Han Sans Neo" pointSize="14"/>
<color key="textColor" name="black2"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="๊น€๋ฏผ์˜" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="plW-no-bRs">
<rect key="frame" x="234.33333333333334" y="14" width="27.666666666666657" height="12.666666666666664"/>
<rect key="frame" x="236" y="14" width="26" height="12.666666666666664"/>
<fontDescription key="fontDescription" name="SpoqaHanSansNeo-Regular" family="Spoqa Han Sans Neo" pointSize="10"/>
<color key="textColor" name="gray5"/>
<nil key="highlightedColor"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class BoardPopupView: UIView {
@IBOutlet private weak var containerView: UIView!
@IBOutlet private weak var titleLabel: UILabel!
@IBOutlet private weak var descriptionLabel: UILabel!
@IBOutlet weak var illustImage: UIImageView!
@IBOutlet private weak var contentsTextView: UITextView!
@IBOutlet private weak var cancelButton: UIButton!
@IBOutlet private weak var confirmButton: UIButton!
Expand Down Expand Up @@ -56,6 +57,13 @@ class BoardPopupView: UIView {
return self
}

func setIllust(_ text: String) -> Self {
if let illust = UIImage(named: text) {
illustImage.image = illust
}
return self
}

func setTextView(_ text: String) -> Self {
contentsTextView.text = text
contentsTextView.textColor = Colors.black2.color
Expand All @@ -65,6 +73,7 @@ class BoardPopupView: UIView {
func getTextField() -> String {
contentsTextView.text
}


func placeholderSetting() {
contentsTextView.delegate = self
Expand Down
25 changes: 13 additions & 12 deletions DooRiBon/DooRiBon/Sources/Base/Board/Views/BoardPopupView.xib
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,33 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3dS-wc-uvl">
<rect key="frame" x="27.666666666666657" y="244.33333333333337" width="320" height="342.33333333333326"/>
<rect key="frame" x="28" y="243.33333333333337" width="319" height="324.33333333333326"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="19" translatesAutoresizingMaskIntoConstraints="NO" id="0ll-iD-pWE">
<rect key="frame" x="20" y="16" width="279" height="290.33333333333331"/>
<rect key="frame" x="20" y="16" width="278" height="290.33333333333331"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="C6b-Qo-6R4">
<rect key="frame" x="0.0" y="0.0" width="279" height="49"/>
<rect key="frame" x="0.0" y="0.0" width="278" height="49"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="6" translatesAutoresizingMaskIntoConstraints="NO" id="GL7-iC-U19">
<rect key="frame" x="0.0" y="0.0" width="233" height="49"/>
<rect key="frame" x="0.0" y="0.0" width="232" height="49"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="์—ฌํ–‰ ๋ชฉํ‘œ" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Iiy-xq-Lyg">
<rect key="frame" x="0.0" y="0.0" width="233" height="27.666666666666668"/>
<rect key="frame" x="0.0" y="0.0" width="232" height="27.666666666666668"/>
<fontDescription key="fontDescription" name="SpoqaHanSansNeo-Bold" family="Spoqa Han Sans Neo" pointSize="20"/>
<color key="textColor" name="black1"/>
<nil key="highlightedColor"/>
</label>
<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="JUu-xn-3Ly">
<rect key="frame" x="0.0" y="33.666666666666629" width="233" height="15.333333333333336"/>
<rect key="frame" x="0.0" y="33.666666666666629" width="232" height="15.333333333333336"/>
<fontDescription key="fontDescription" name="SpoqaHanSansNeo-Regular" family="Spoqa Han Sans Neo" pointSize="12"/>
<color key="textColor" name="gray5"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Hue-xO-plj">
<rect key="frame" x="233" y="0.0" width="46" height="49"/>
<rect key="frame" x="232" y="0.0" width="46" height="49"/>
<constraints>
<constraint firstAttribute="width" constant="46" id="hxs-AD-i2P"/>
<constraint firstAttribute="height" constant="49" id="una-is-qDR"/>
Expand All @@ -64,7 +64,7 @@
</constraints>
</stackView>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="khV-Zu-nPR">
<rect key="frame" x="0.0" y="67.999999999999957" width="279" height="155.33333333333337"/>
<rect key="frame" x="0.0" y="67.999999999999957" width="278" height="155.33333333333337"/>
<color key="backgroundColor" name="gray7"/>
<constraints>
<constraint firstAttribute="height" constant="155.33000000000001" id="PVY-Cf-mcS"/>
Expand All @@ -74,10 +74,10 @@
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="7" translatesAutoresizingMaskIntoConstraints="NO" id="idn-C4-3Vs">
<rect key="frame" x="0.0" y="242.33333333333331" width="279" height="48"/>
<rect key="frame" x="0.0" y="242.33333333333331" width="278" height="48"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ELg-Hu-E7f">
<rect key="frame" x="0.0" y="0.0" width="136" height="48"/>
<rect key="frame" x="0.0" y="0.0" width="135.66666666666666" height="48"/>
<color key="backgroundColor" name="gray7"/>
<state key="normal" title="์ทจ์†Œ">
<color key="titleColor" name="gray4"/>
Expand All @@ -92,7 +92,7 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="l43-Pv-eVY">
<rect key="frame" x="143" y="0.0" width="136" height="48"/>
<rect key="frame" x="142.66666666666663" y="0.0" width="135.33333333333337" height="48"/>
<color key="backgroundColor" name="pointOrange"/>
<state key="normal" title="ํ™•์ธ">
<color key="titleColor" name="white9"/>
Expand Down Expand Up @@ -129,7 +129,6 @@
<constraint firstItem="0ll-iD-pWE" firstAttribute="top" secondItem="3dS-wc-uvl" secondAttribute="top" constant="16" id="3HN-AP-242"/>
<constraint firstAttribute="trailing" secondItem="0ll-iD-pWE" secondAttribute="trailing" constant="21" id="CI9-Of-3lZ"/>
<constraint firstAttribute="bottom" secondItem="0ll-iD-pWE" secondAttribute="bottom" constant="18" id="RQD-8T-4UF"/>
<constraint firstAttribute="width" constant="320" id="SNG-oJ-nig"/>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="323" id="fKA-1t-s1I"/>
</constraints>
<userDefinedRuntimeAttributes>
Expand All @@ -145,13 +144,15 @@
<constraint firstItem="3dS-wc-uvl" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="PkJ-kJ-lWH"/>
<constraint firstItem="vUN-kp-3ea" firstAttribute="bottom" secondItem="3dS-wc-uvl" secondAttribute="bottom" constant="210.33333333333337" id="dkO-05-kYY"/>
<constraint firstItem="3dS-wc-uvl" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="ta6-Rq-vEv"/>
<constraint firstItem="3dS-wc-uvl" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="28" id="zRn-fc-0Qg"/>
</constraints>
<connections>
<outlet property="cancelButton" destination="ELg-Hu-E7f" id="acM-m0-m5h"/>
<outlet property="confirmButton" destination="l43-Pv-eVY" id="g48-n8-9Gm"/>
<outlet property="containerView" destination="3dS-wc-uvl" id="7Fy-Fn-lgN"/>
<outlet property="contentsTextView" destination="khV-Zu-nPR" id="JVe-GZ-fzS"/>
<outlet property="descriptionLabel" destination="JUu-xn-3Ly" id="TVJ-ih-1Pp"/>
<outlet property="illustImage" destination="Hue-xO-plj" id="ByP-ul-ds1"/>
<outlet property="titleLabel" destination="Iiy-xq-Lyg" id="yZP-Qw-V4h"/>
</connections>
<point key="canvasLocation" x="138.40000000000001" y="136.69950738916256"/>
Expand Down
Loading

0 comments on commit 75c1386

Please sign in to comment.