Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] #105 - 명함생성 미리보기 뷰 명함 화면전환효과 추가 #106

Merged
merged 4 commits into from
Dec 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions NADA-iOS-forRelease/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
<string>Spoqa Han Sans Neo Bold.otf</string>
<string>Spoqa Han Sans Neo Regular.otf</string>
</array>
<key>LSApplicationCategoryType</key>
<string></string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
Expand All @@ -35,23 +33,8 @@
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UIAppFonts</key>
<array>
<string>NotoSansCJKkr-Bold.otf</string>
<string>NotoSansCJKkr-Medium.otf</string>
<string>NotoSansCJKkr-Regular.otf</string>
<string>Spoqa Han Sans Neo Bold.otf</string>
<string>Spoqa Han Sans Neo Regular.otf</string>
</array>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
Expand Down Expand Up @@ -90,7 +73,5 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIUserInterfaceStyle</key>
<string></string>
</dict>
</plist>
2 changes: 2 additions & 0 deletions NADA-iOS-forRelease/Resouces/Constants/Notification.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ extension Notification.Name {
// MARK: - Card Creation
static let frontCardBirth = Notification.Name("frontCardBirth")
static let frontCardMBTI = Notification.Name("frontCardMBTI")
static let presentingImagePicker = Notification.Name("presentingImagePicker")
static let sendNewImage = Notification.Name("sendNewImage")
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FHO-mj-1yu">
<rect key="frame" x="24" y="114" width="327" height="540"/>
<color key="backgroundColor" systemColor="systemGray6Color"/>
<gestureRecognizers/>
<constraints>
<constraint firstAttribute="height" constant="540" id="b0L-OT-Q7F"/>
<constraint firstAttribute="width" constant="327" id="xtT-wz-pPq"/>
Expand Down
36 changes: 36 additions & 0 deletions NADA-iOS-forRelease/Sources/Cells/CardCell/BackCardCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,40 @@ extension BackCardCell {
self.secondTmiLabel.text = secondTmi
self.thirdTmiLabel.text = thirdTmi
}

// FIXME: - UIImage 로 넘어올때. 나중에 어떻게 사용할지 정해야함.
func initCell(_ backgroundImage: UIImage?,
_ isMintImage: Bool,
_ isNoMintImage: Bool,
_ isSojuImage: Bool,
_ isBeerImage: Bool,
_ isPourImage: Bool,
_ isPutSauceImage: Bool,
_ isYangnyumImage: Bool,
_ isFriedImage: Bool,
_ firstTmi: String,
_ secondTmi: String,
_ thirdTmi: String) {

self.backgroundImageView.image = backgroundImage ?? UIImage()
self.mintImageView.image = isMintImage == true ?
UIImage(named: "iconTasteOnMincho") : UIImage(named: "iconTasteOffMincho")
self.noMintImageView.image = isNoMintImage == true ?
UIImage(named: "iconTasteOnBanmincho") : UIImage(named: "iconTasteOffBanmincho")
self.sojuImageView.image = isSojuImage == true ?
UIImage(named: "iconTasteOnSoju") : UIImage(named: "iconTasteOffSoju")
self.beerImageView.image = isBeerImage == true ?
UIImage(named: "iconTasteOnBeer") : UIImage(named: "iconTasteOffBeer")
self.pourEatImageView.image = isPourImage == true ?
UIImage(named: "iconTasteOnBumeok") : UIImage(named: "iconTasteOffBumeok")
self.putSauceEatImageView.image = isPutSauceImage == true ?
UIImage(named: "iconTasteOnZzik") : UIImage(named: "iconTasteOffZzik")
self.sauceChickenImageView.image = isYangnyumImage == true ?
UIImage(named: "iconTasteOnSeasoned") : UIImage(named: "iconTasteOffSeasoned")
self.friedChickenImageView.image = isFriedImage == true ?
UIImage(named: "iconTasteOnFried") : UIImage(named: "iconTasteOffFried")
self.firstTmiLabel.text = firstTmi
self.secondTmiLabel.text = secondTmi
self.thirdTmiLabel.text = thirdTmi
}
}
36 changes: 27 additions & 9 deletions NADA-iOS-forRelease/Sources/Cells/CardCell/FrontCardCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ class FrontCardCell: CardCell {
@IBOutlet weak var userNameLabel: UILabel!
@IBOutlet weak var birthLabel: UILabel!
@IBOutlet weak var mbtiLabel: UILabel!
@IBOutlet weak var instagramImageView: UIImageView!
@IBOutlet weak var instagramIDLabel: UILabel!
@IBOutlet weak var linkURLImageView: UIImageView!
@IBOutlet weak var linkURLLabel: UILabel!

// MARK: - Life Cycle
Expand Down Expand Up @@ -52,6 +50,7 @@ extension FrontCardCell {
instagramIDLabel.textColor = .white
linkURLLabel.font = .textRegular04
linkURLLabel.textColor = .white
linkURLLabel.numberOfLines = 2
}

func initCell(_ backgroundImage: String,
Expand All @@ -65,12 +64,31 @@ extension FrontCardCell {
if let bgImage = UIImage(named: backgroundImage) {
self.backgroundImageView.image = bgImage
}
self.titleLabel.text = cardTitle
self.descriptionLabel.text = cardDescription
self.userNameLabel.text = userName
self.birthLabel.text = birth
self.mbtiLabel.text = mbti
self.instagramIDLabel.text = instagramID
self.linkURLLabel.text = linkURL
titleLabel.text = cardTitle
descriptionLabel.text = cardDescription
userNameLabel.text = userName
birthLabel.text = birth
mbtiLabel.text = mbti
instagramIDLabel.text = instagramID
linkURLLabel.text = linkURL
}

// FIXME: - UIImage 로 넘어올때. 나중에 어떻게 사용할지 정해야함.
func initCell(_ backgroundImage: UIImage?,
_ cardTitle: String,
_ cardDescription: String,
_ userName: String,
_ birth: String,
_ mbti: String,
_ instagramID: String,
_ linkURL: String) {
backgroundImageView.image = backgroundImage ?? UIImage()
titleLabel.text = cardTitle
descriptionLabel.text = cardDescription
userNameLabel.text = userName
birthLabel.text = birth
mbtiLabel.text = mbti
instagramIDLabel.text = instagramID
linkURLLabel.text = linkURL
}
}
19 changes: 14 additions & 5 deletions NADA-iOS-forRelease/Sources/Cells/CardCell/FrontCardCell.xib
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
Expand All @@ -25,6 +24,15 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</imageView>
<view alpha="0.5" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="S8I-Fv-fkf">
<rect key="frame" x="0.0" y="0.0" width="327" height="540"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="20"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OeE-mZ-GcL">
<rect key="frame" x="24" y="50" width="41.5" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
Expand Down Expand Up @@ -75,9 +83,9 @@
</imageView>
</subviews>
</view>
<viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/>
<constraints>
<constraint firstItem="cO6-DY-EUn" firstAttribute="top" secondItem="VDj-1w-jyf" secondAttribute="bottom" constant="193" id="025-5i-Sid"/>
<constraint firstItem="S8I-Fv-fkf" firstAttribute="leading" secondItem="D6t-Nc-4xH" secondAttribute="leading" id="1U6-VC-gzG"/>
<constraint firstItem="eyB-c0-PQB" firstAttribute="leading" secondItem="OeE-mZ-GcL" secondAttribute="leading" id="4Ry-xS-5OB"/>
<constraint firstItem="OeE-mZ-GcL" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="50" id="4yZ-WV-dW5"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="VDj-1w-jyf" secondAttribute="trailing" constant="24" id="5rw-tM-UsX"/>
Expand All @@ -92,11 +100,14 @@
<constraint firstItem="eyB-c0-PQB" firstAttribute="top" secondItem="aik-Vi-yux" secondAttribute="bottom" constant="10" id="Ebd-SK-4i7"/>
<constraint firstAttribute="trailing" secondItem="D6t-Nc-4xH" secondAttribute="trailing" id="GGx-Tf-nEl"/>
<constraint firstItem="TXF-fP-7YQ" firstAttribute="leading" secondItem="OeE-mZ-GcL" secondAttribute="leading" id="ITf-JC-Tm4"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="LqW-bV-yHr" secondAttribute="bottom" constant="5" id="JrI-dN-H5E"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="LqW-bV-yHr" secondAttribute="bottom" constant="30" id="JrI-dN-H5E"/>
<constraint firstItem="S8I-Fv-fkf" firstAttribute="bottom" secondItem="D6t-Nc-4xH" secondAttribute="bottom" id="N52-K9-r1O"/>
<constraint firstItem="aik-Vi-yux" firstAttribute="top" secondItem="cO6-DY-EUn" secondAttribute="bottom" constant="13" id="RLL-SV-ohE"/>
<constraint firstItem="TXF-fP-7YQ" firstAttribute="top" secondItem="eyB-c0-PQB" secondAttribute="bottom" constant="55" id="RtB-w6-jlM"/>
<constraint firstItem="S8I-Fv-fkf" firstAttribute="top" secondItem="D6t-Nc-4xH" secondAttribute="top" id="Uuk-OY-MiG"/>
<constraint firstItem="VDj-1w-jyf" firstAttribute="top" secondItem="OeE-mZ-GcL" secondAttribute="bottom" constant="8" id="W5z-RH-cOC"/>
<constraint firstAttribute="bottom" secondItem="D6t-Nc-4xH" secondAttribute="bottom" id="g3O-ib-dRy"/>
<constraint firstItem="S8I-Fv-fkf" firstAttribute="trailing" secondItem="D6t-Nc-4xH" secondAttribute="trailing" id="gIl-Qp-bCT"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="eyB-c0-PQB" secondAttribute="trailing" constant="24" id="ihs-PT-9zZ"/>
<constraint firstItem="OeE-mZ-GcL" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="24" id="kch-bF-wdy"/>
<constraint firstItem="el0-x0-WD9" firstAttribute="leading" secondItem="OeE-mZ-GcL" secondAttribute="leading" id="ks3-oC-rKr"/>
Expand All @@ -114,8 +125,6 @@
<outlet property="birthLabel" destination="aik-Vi-yux" id="QTx-yd-LoY"/>
<outlet property="descriptionLabel" destination="VDj-1w-jyf" id="YqY-uP-XQV"/>
<outlet property="instagramIDLabel" destination="8oi-jO-fkf" id="eIE-ch-cCT"/>
<outlet property="instagramImageView" destination="TXF-fP-7YQ" id="yIP-5S-tPH"/>
<outlet property="linkURLImageView" destination="el0-x0-WD9" id="O2h-sb-XSb"/>
<outlet property="linkURLLabel" destination="LqW-bV-yHr" id="vD7-qs-hSc"/>
<outlet property="mbtiLabel" destination="eyB-c0-PQB" id="waJ-j4-tRM"/>
<outlet property="titleLabel" destination="OeE-mZ-GcL" id="NIa-Yu-Bit"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,17 @@ extension BackCardCreationCollectionViewCell: UICollectionViewDataSource {
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: Const.Xib.requiredCollectionViewCell, for: indexPath) as? RequiredFlavorCollectionViewCell else {
return UICollectionViewCell()
}

if collectionView == isMinchoCollectionView {
switch collectionView {
case isMinchoCollectionView:
cell.initCell(flavor: flavorList[indexPath.item])
} else if collectionView == isSojuCollectionView {
case isSojuCollectionView:
cell.initCell(flavor: flavorList[indexPath.item + 2])
} else if collectionView == isBoomukCollectionView {
case isBoomukCollectionView:
cell.initCell(flavor: flavorList[indexPath.item + 4])
} else {
case isSaucedCollectionView:
cell.initCell(flavor: flavorList[indexPath.item + 6])
default:
return UICollectionViewCell()
}
return cell
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ class BackgroundCollectionViewCell: UICollectionViewCell {
// MARK: - @IBOutlet Properties

@IBOutlet weak var bgView: UIView!
@IBOutlet weak var opacityView: UIView!
@IBOutlet weak var imageView: UIImageView!
@IBOutlet weak var addPhotoImageView: UIImageView!

// MARK: - View Life Cycle

Expand All @@ -34,14 +36,15 @@ extension BackgroundCollectionViewCell {
private func setUI() {
bgView.backgroundColor = .tertiary
bgView.isHidden = true
bgView.layer.cornerRadius = bgView.frame.height / 2
bgView.layer.cornerRadius = bgViewCornerRadius

opacityView.layer.cornerRadius = imageviewCornerRadius
imageView.layer.cornerRadius = imageviewCornerRadius
}
func initCell(image: String) {
if let image = UIImage(named: image) {
imageView.image = image
}
func initCell(image: UIImage, isFirst: Bool) {
imageView.image = image
addPhotoImageView.isHidden = isFirst == true ? false : true
opacityView.isHidden = isFirst == true ? false : true
}
override var isSelected: Bool {
didSet {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,48 @@
<rect key="frame" x="2" y="2" width="282" height="129"/>
<color key="backgroundColor" name="textBox"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZdQ-cS-9PV">
<rect key="frame" x="2" y="2" width="282" height="129"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="iconAddPhoto" translatesAutoresizingMaskIntoConstraints="NO" id="e2c-wO-dVr">
<rect key="frame" x="129" y="52.5" width="24" height="24"/>
</imageView>
</subviews>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.25" colorSpace="custom" customColorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="e2c-wO-dVr" firstAttribute="centerX" secondItem="ZdQ-cS-9PV" secondAttribute="centerX" id="FHk-Ze-VLi"/>
<constraint firstItem="e2c-wO-dVr" firstAttribute="centerY" secondItem="ZdQ-cS-9PV" secondAttribute="centerY" id="WU6-94-t2S"/>
</constraints>
</view>
</subviews>
</view>
<viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/>
<constraints>
<constraint firstItem="ZdQ-cS-9PV" firstAttribute="top" secondItem="hnM-Yz-8h1" secondAttribute="top" id="2Fw-tj-oa8"/>
<constraint firstAttribute="bottom" secondItem="5HA-yB-R7S" secondAttribute="bottom" id="6c8-CY-ULf"/>
<constraint firstAttribute="trailing" secondItem="5HA-yB-R7S" secondAttribute="trailing" id="Gbu-9Y-Cy6"/>
<constraint firstAttribute="trailing" secondItem="hnM-Yz-8h1" secondAttribute="trailing" constant="2" id="MGg-Cb-lL0"/>
<constraint firstItem="hnM-Yz-8h1" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="2" id="Rjs-Ag-bY0"/>
<constraint firstItem="ZdQ-cS-9PV" firstAttribute="leading" secondItem="hnM-Yz-8h1" secondAttribute="leading" id="ZsJ-k2-zyI"/>
<constraint firstItem="ZdQ-cS-9PV" firstAttribute="trailing" secondItem="hnM-Yz-8h1" secondAttribute="trailing" id="aBg-xq-Mtj"/>
<constraint firstItem="5HA-yB-R7S" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="bZN-gl-Jhl"/>
<constraint firstItem="hnM-Yz-8h1" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="2" id="hA9-qF-fWY"/>
<constraint firstItem="ZdQ-cS-9PV" firstAttribute="bottom" secondItem="hnM-Yz-8h1" secondAttribute="bottom" id="miJ-Zo-YSX"/>
<constraint firstItem="5HA-yB-R7S" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="pUm-bZ-rD9"/>
<constraint firstAttribute="bottom" secondItem="hnM-Yz-8h1" secondAttribute="bottom" constant="2" id="wpX-8b-ecT"/>
</constraints>
<size key="customSize" width="286" height="133"/>
<connections>
<outlet property="addPhotoImageView" destination="e2c-wO-dVr" id="wAY-DM-jFr"/>
<outlet property="bgView" destination="5HA-yB-R7S" id="XwF-Gw-MoT"/>
<outlet property="imageView" destination="hnM-Yz-8h1" id="aTy-l5-hSx"/>
<outlet property="opacityView" destination="ZdQ-cS-9PV" id="bV9-jX-K7u"/>
</connections>
<point key="canvasLocation" x="-74" y="41"/>
<point key="canvasLocation" x="-75.362318840579718" y="40.513392857142854"/>
</collectionViewCell>
</objects>
<resources>
<image name="iconAddPhoto" width="24" height="24"/>
<namedColor name="textBox">
<color red="0.94509803921568625" green="0.95294117647058818" blue="0.96078431372549022" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
Expand Down
Loading