Skip to content

Commit

Permalink
Merge branch 'develop' into feature/TeamNADA#96
Browse files Browse the repository at this point in the history
  • Loading branch information
dlwns33 committed Dec 4, 2021
2 parents 482bcfd + 7ec3d18 commit d69d865
Show file tree
Hide file tree
Showing 25 changed files with 737 additions and 138 deletions.
20 changes: 18 additions & 2 deletions NADA-iOS-forRelease.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
F87122762733046300A24E74 /* Card.swift in Sources */ = {isa = PBXBuildFile; fileRef = F87122752733046300A24E74 /* Card.swift */; };
F871227827330A3800A24E74 /* CardCreationRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F871227727330A3800A24E74 /* CardCreationRequest.swift */; };
F8719DDB274F92E90081AD51 /* UITextField+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8719DDA274F92E90081AD51 /* UITextField+Extension.swift */; };
F8915A22275728F20013D609 /* SelectBirthBottomViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8915A20275728F20013D609 /* SelectBirthBottomViewController.swift */; };
F8915A23275728F20013D609 /* SelectMBTIBottomViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8915A21275728F20013D609 /* SelectMBTIBottomViewController.swift */; };
F8A9FE1A2743DC6B00BC60CE /* CardListInGroupRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8A9FE192743DC6B00BC60CE /* CardListInGroupRequest.swift */; };
F8C310C0273A7360008EC5BA /* FrontCardCreationDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C310BF273A7360008EC5BA /* FrontCardCreationDelegate.swift */; };
F8C83FAE272F99940009DF0D /* MoyaLoggerPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C83FAD272F99940009DF0D /* MoyaLoggerPlugin.swift */; };
Expand Down Expand Up @@ -195,6 +197,8 @@
F87122752733046300A24E74 /* Card.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Card.swift; sourceTree = "<group>"; };
F871227727330A3800A24E74 /* CardCreationRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardCreationRequest.swift; sourceTree = "<group>"; };
F8719DDA274F92E90081AD51 /* UITextField+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITextField+Extension.swift"; sourceTree = "<group>"; };
F8915A20275728F20013D609 /* SelectBirthBottomViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelectBirthBottomViewController.swift; sourceTree = "<group>"; };
F8915A21275728F20013D609 /* SelectMBTIBottomViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelectMBTIBottomViewController.swift; sourceTree = "<group>"; };
F8A9FE192743DC6B00BC60CE /* CardListInGroupRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardListInGroupRequest.swift; sourceTree = "<group>"; };
F8C310BF273A7360008EC5BA /* FrontCardCreationDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FrontCardCreationDelegate.swift; sourceTree = "<group>"; };
F8C83FAD272F99940009DF0D /* MoyaLoggerPlugin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoyaLoggerPlugin.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -380,6 +384,8 @@
398413B6274A7A1E005550BC /* AddGroupBottomSheetViewController.swift */,
77703156275005AA002CBD19 /* CardResultBottomSheetViewController.swift */,
7713E8472752E2A900724C8B /* SelectGroupBottomSheetViewController.swift */,
F8915A20275728F20013D609 /* SelectBirthBottomViewController.swift */,
F8915A21275728F20013D609 /* SelectMBTIBottomViewController.swift */,
);
path = BottomSheet;
sourceTree = "<group>";
Expand Down Expand Up @@ -518,6 +524,15 @@
path = Card;
sourceTree = "<group>";
};
F8915A1F275713A10013D609 /* CardCreation */ = {
isa = PBXGroup;
children = (
F8FC43B226C020B90033E151 /* BackCardCreationDelegate.swift */,
F8C310BF273A7360008EC5BA /* FrontCardCreationDelegate.swift */,
);
path = CardCreation;
sourceTree = "<group>";
};
F8C83FAC272F998A0009DF0D /* Plugin */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -677,8 +692,7 @@
F8FC439F26C01EFC0033E151 /* Protocols */ = {
isa = PBXGroup;
children = (
F8FC43B226C020B90033E151 /* BackCardCreationDelegate.swift */,
F8C310BF273A7360008EC5BA /* FrontCardCreationDelegate.swift */,
F8915A1F275713A10013D609 /* CardCreation */,
);
path = Protocols;
sourceTree = "<group>";
Expand Down Expand Up @@ -977,7 +991,9 @@
F822E7A92709CEB60020452C /* Notification.swift in Sources */,
F8C83FC5272FA2940009DF0D /* CardAPI.swift in Sources */,
7729171F2743D604001593E0 /* CardsInGroupResponse.swift in Sources */,
F8915A22275728F20013D609 /* SelectBirthBottomViewController.swift in Sources */,
F8FC438626C01CDD0033E151 /* AppDelegate.swift in Sources */,
F8915A23275728F20013D609 /* SelectMBTIBottomViewController.swift in Sources */,
F8C83FB8272F9E3F0009DF0D /* UtilAPI.swift in Sources */,
F8FC438826C01CDD0033E151 /* SceneDelegate.swift in Sources */,
39288E12273F52B20072F403 /* CardListLookUpRequest.swift in Sources */,
Expand Down
9 changes: 6 additions & 3 deletions NADA-iOS-forRelease/Resouces/Constants/Notification.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
import Foundation

extension Notification.Name {
// delegate 패턴으로 대체
// static let frontCardtextFieldIsEmpty = Notification.Name("frontCardtextFieldIsEmpty")
// static let backCardtextFieldIsEmpty = Notification.Name("backCardtextFieldIsEmpty")
static let deleteTabBar = NSNotification.Name("deleteTabBar")
static let expressTabBar = NSNotification.Name("expressTabBar")

// 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 @@ -9,14 +9,12 @@ import Foundation
import UIKit

extension UIViewController {

/// 취소+삭제 UIAlertController
func makeCancelDeleteAlert(title: String,
message: String,
cancelAction: ((UIAlertAction) -> Void)? = nil,
deleteAction: ((UIAlertAction) -> Void)?,
completion: (() -> Void)? = nil) {

let alertViewController = UIAlertController(title: title,
message: message,
preferredStyle: .alert)
Expand Down
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
6 changes: 3 additions & 3 deletions NADA-iOS-forRelease/Resouces/Storyboards/More/More.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
</constraints>
</view>
<tableView autoresizesSubviews="NO" clipsSubviews="YES" contentMode="scaleToFill" bounces="NO" alwaysBounceVertical="YES" scrollEnabled="NO" bouncesZoom="NO" dataMode="prototypes" style="plain" separatorStyle="none" allowsSelection="NO" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" estimatedSectionHeaderHeight="-1" sectionFooterHeight="28" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="WnB-Ge-3qg">
<rect key="frame" x="0.0" y="104" width="375" height="466"/>
<rect key="frame" x="0.0" y="104" width="375" height="404"/>
<color key="backgroundColor" name="textBox"/>
<constraints>
<constraint firstAttribute="height" constant="466" id="F5a-T6-amW"/>
<constraint firstAttribute="height" constant="404" id="F5a-T6-amW"/>
</constraints>
</tableView>
</subviews>
Expand All @@ -67,7 +67,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="64" y="56"/>
<point key="canvasLocation" x="63.200000000000003" y="55.418719211822662"/>
</scene>
</scenes>
<resources>
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
Loading

0 comments on commit d69d865

Please sign in to comment.