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] #73 - 명함생성 미리보기 뷰 만들기 #77

Merged
merged 1 commit into from
Nov 25, 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
8 changes: 8 additions & 0 deletions NADA-iOS-forRelease.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
F84BAFAE26FDB543004CA335 /* FrontCardCreationCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F84BAFAC26FDB543004CA335 /* FrontCardCreationCollectionViewCell.xib */; };
F84BAFB126FDB552004CA335 /* BackCardCreationCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F84BAFAF26FDB552004CA335 /* BackCardCreationCollectionViewCell.swift */; };
F84BAFB226FDB552004CA335 /* BackCardCreationCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F84BAFB026FDB552004CA335 /* BackCardCreationCollectionViewCell.xib */; };
F85711A5274A6B2200F59F0B /* CardCreationPreviewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F85711A4274A6B2200F59F0B /* CardCreationPreviewViewController.swift */; };
F85711A7274A6B3400F59F0B /* CardCreationPreview.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F85711A6274A6B3400F59F0B /* CardCreationPreview.storyboard */; };
F858079E2700354E00872484 /* BackgroundCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F858079C2700354E00872484 /* BackgroundCollectionViewCell.swift */; };
F858079F2700354E00872484 /* BackgroundCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F858079D2700354E00872484 /* BackgroundCollectionViewCell.xib */; };
F87122762733046300A24E74 /* Card.swift in Sources */ = {isa = PBXBuildFile; fileRef = F87122752733046300A24E74 /* Card.swift */; };
Expand Down Expand Up @@ -154,6 +156,8 @@
F84BAFAC26FDB543004CA335 /* FrontCardCreationCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = FrontCardCreationCollectionViewCell.xib; sourceTree = "<group>"; };
F84BAFAF26FDB552004CA335 /* BackCardCreationCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackCardCreationCollectionViewCell.swift; sourceTree = "<group>"; };
F84BAFB026FDB552004CA335 /* BackCardCreationCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BackCardCreationCollectionViewCell.xib; sourceTree = "<group>"; };
F85711A4274A6B2200F59F0B /* CardCreationPreviewViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardCreationPreviewViewController.swift; sourceTree = "<group>"; };
F85711A6274A6B3400F59F0B /* CardCreationPreview.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = CardCreationPreview.storyboard; sourceTree = "<group>"; };
F858079C2700354E00872484 /* BackgroundCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackgroundCollectionViewCell.swift; sourceTree = "<group>"; };
F858079D2700354E00872484 /* BackgroundCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BackgroundCollectionViewCell.xib; sourceTree = "<group>"; };
F87122752733046300A24E74 /* Card.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Card.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -389,6 +393,7 @@
isa = PBXGroup;
children = (
F82FF81C2701EBCE00E57F8B /* CardCreation.storyboard */,
F85711A6274A6B3400F59F0B /* CardCreationPreview.storyboard */,
);
path = CardCreation;
sourceTree = "<group>";
Expand All @@ -410,6 +415,7 @@
isa = PBXGroup;
children = (
F84BAF9C26FDB417004CA335 /* CardCreationViewController.swift */,
F85711A4274A6B2200F59F0B /* CardCreationPreviewViewController.swift */,
);
path = CardCreation;
sourceTree = "<group>";
Expand Down Expand Up @@ -733,6 +739,7 @@
buildActionMask = 2147483647;
files = (
F8FC43BF26C025180033E151 /* .swiftlint.yml in Resources */,
F85711A7274A6B3400F59F0B /* CardCreationPreview.storyboard in Resources */,
39369936274A4FCB00684420 /* NotoSansCJKkr-Regular.otf in Resources */,
39369935274A4FCB00684420 /* NotoSansCJKkr-Bold.otf in Resources */,
39D88B622745FBA900A72164 /* More.storyboard in Resources */,
Expand Down Expand Up @@ -835,6 +842,7 @@
3958F239270FFBBF00B100B2 /* GroupViewController.swift in Sources */,
3909242F26FA15E800236C51 /* UIView+Extension.swift in Sources */,
39523E09270184A700536900 /* CardListViewController.swift in Sources */,
F85711A5274A6B2200F59F0B /* CardCreationPreviewViewController.swift in Sources */,
777FF89B27359B7800BF69D3 /* Groups.swift in Sources */,
777FF89F27364B7B00BF69D3 /* GroupEditRequest.swift in Sources */,
399C55DF2711949D00845A54 /* CGPoint+Distance.swift in Sources */,
Expand Down
1 change: 1 addition & 0 deletions NADA-iOS-forRelease/Resouces/Constants/Storyboard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ extension Const {
static let front = "Front"
static let group = "Group"
static let tabBar = "TabBar"
static let cardCreationPreview = "CardCreationPreview"
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ extension Const {
static let groupViewController = "GroupViewController"
static let tabBarViewController = "TabBarViewController"
static let commonBottomSheetViewController = "CommonBottomSheetViewController"
static let cardCreationPreviewViewController = "CardCreationPreviewViewController"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina5_9" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<customFonts key="customFonts">
<array key="Spoqa Han Sans Neo Bold.otf">
<string>SpoqaHanSansNeo-Bold</string>
</array>
</customFonts>
<scenes>
<!--Card Creation Preview View Controller-->
<scene sceneID="s0d-6b-0kx">
<objects>
<viewController storyboardIdentifier="CardCreationPreviewViewController" id="Y6W-OH-hqX" customClass="CardCreationPreviewViewController" customModule="NADA_iOS_forRelease" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="5EZ-qb-Rvc">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<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"/>
<constraints>
<constraint firstAttribute="height" constant="540" id="b0L-OT-Q7F"/>
<constraint firstAttribute="width" constant="327" id="xtT-wz-pPq"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uDr-em-N5O">
<rect key="frame" x="0.0" y="44" width="375" height="50"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JTT-Cr-gmG">
<rect key="frame" x="24" y="13" width="24" height="24"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="iconArrow"/>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="명함생성" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="V9F-GG-Wlr">
<rect key="frame" x="154.66666666666666" y="14" width="66" height="22"/>
<fontDescription key="fontDescription" name="SpoqaHanSansNeo-Bold" family="Spoqa Han Sans Neo" pointSize="18"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="JTT-Cr-gmG" firstAttribute="leading" secondItem="uDr-em-N5O" secondAttribute="leading" constant="24" id="1Ua-po-FsI"/>
<constraint firstItem="V9F-GG-Wlr" firstAttribute="centerY" secondItem="uDr-em-N5O" secondAttribute="centerY" id="2Gw-sl-wiA"/>
<constraint firstAttribute="height" constant="50" id="N4A-u1-qRn"/>
<constraint firstItem="V9F-GG-Wlr" firstAttribute="centerX" secondItem="uDr-em-N5O" secondAttribute="centerX" id="Ns9-VG-PLx"/>
<constraint firstItem="JTT-Cr-gmG" firstAttribute="centerY" secondItem="uDr-em-N5O" secondAttribute="centerY" id="lyV-T8-gvk"/>
</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="Cgr-Tn-nVH">
<rect key="frame" x="61.666666666666657" y="670" width="251.99999999999997" height="20.333333333333371"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gc2-31-hRU">
<rect key="frame" x="24" y="704" width="327" height="54"/>
<constraints>
<constraint firstAttribute="height" constant="54" id="smH-Df-7w1"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" image="btnMainCreate"/>
<connections>
<action selector="touchCompleteButton:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="fX7-aC-GHN"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="gc2-31-hRU" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" constant="24" id="F5V-8J-dgG"/>
<constraint firstItem="vDu-zF-Fre" firstAttribute="bottom" secondItem="gc2-31-hRU" secondAttribute="bottom" constant="20" id="LL1-yz-cMQ"/>
<constraint firstItem="vDu-zF-Fre" firstAttribute="trailing" secondItem="uDr-em-N5O" secondAttribute="trailing" id="QIx-O8-j8T"/>
<constraint firstItem="gc2-31-hRU" firstAttribute="centerX" secondItem="5EZ-qb-Rvc" secondAttribute="centerX" id="aKP-gg-liM"/>
<constraint firstItem="vDu-zF-Fre" firstAttribute="trailing" secondItem="gc2-31-hRU" secondAttribute="trailing" constant="24" id="f6v-GI-x11"/>
<constraint firstItem="FHO-mj-1yu" firstAttribute="centerX" secondItem="5EZ-qb-Rvc" secondAttribute="centerX" id="hSh-ze-IMo"/>
<constraint firstItem="FHO-mj-1yu" firstAttribute="top" secondItem="uDr-em-N5O" secondAttribute="bottom" constant="20" id="hXB-Ag-lPO"/>
<constraint firstItem="uDr-em-N5O" firstAttribute="top" secondItem="vDu-zF-Fre" secondAttribute="top" id="hXg-Oz-Nov"/>
<constraint firstItem="uDr-em-N5O" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" id="skC-Pk-0uC"/>
<constraint firstItem="Cgr-Tn-nVH" firstAttribute="top" secondItem="FHO-mj-1yu" secondAttribute="bottom" constant="16" id="w8o-yF-wAo"/>
<constraint firstItem="Cgr-Tn-nVH" firstAttribute="centerX" secondItem="5EZ-qb-Rvc" secondAttribute="centerX" id="xZ1-l1-cPd"/>
</constraints>
</view>
<connections>
<outlet property="cardView" destination="FHO-mj-1yu" id="e9Z-Ne-BT9"/>
<outlet property="noticeLabel" destination="Cgr-Tn-nVH" id="wCc-76-DOD"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="30" y="62"/>
</scene>
</scenes>
<resources>
<image name="btnMainCreate" width="327" height="54"/>
<image name="iconArrow" width="24" height="24"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemGray6Color">
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
49 changes: 27 additions & 22 deletions NADA-iOS-forRelease/Sources/Cells/CardCell/FrontCardCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,25 @@ class FrontCardCell: CardCell {

// MARK: - @IBOutlet Properties
@IBOutlet weak var backgroundImageView: UIImageView!
@IBOutlet weak var cardNameLabel: UILabel!
@IBOutlet weak var detailCardNameLabel: UILabel!
@IBOutlet weak var titleLabel: UILabel!
@IBOutlet weak var descriptionLabel: UILabel!
@IBOutlet weak var userNameLabel: UILabel!
@IBOutlet weak var birthLabel: UILabel!
@IBOutlet weak var mbtiLabel: UILabel!
@IBOutlet weak var instagramImageView: UIImageView!
@IBOutlet weak var instagramTextLabel: UILabel!
@IBOutlet weak var instagramIDLabel: UILabel!
@IBOutlet weak var linkImageView: UIImageView!
@IBOutlet weak var linkTextLabel: UILabel!
@IBOutlet weak var linkIDLabel: UILabel!
@IBOutlet weak var linkURLImageView: UIImageView!
@IBOutlet weak var linkURLLabel: UILabel!

// MARK: - Life Cycle

override func awakeFromNib() {
super.awakeFromNib()
setUI()
}

static func nib() -> UINib {
return UINib(nibName: "FrontCardCell", bundle: nil)
return UINib(nibName: "FrontCardCell", bundle: Bundle(for: FrontCardCell.self))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분이 그 오류를 없앤 부분인가요 교수님??🥺

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이렇게 하면 없어진다는데 안되서 일단 다른 쪽도 문제가 있나 해보고 이슈파고 해결하려구용

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저는 얼렁뚤땅 없어졌던 에러를 이렇게....또 하나 배워갑니다 교수님👍🏻

}
}

Expand All @@ -40,34 +39,40 @@ class FrontCardCell: CardCell {
extension FrontCardCell {
private func setUI() {
// hidden 에 대한 속성도 여기 쓰자.

// instagramImageView.image = UIImage(named: "instagramLogoImg")
instagramTextLabel.text = "Instagram"

titleLabel.font = .title02
titleLabel.textColor = .primary
descriptionLabel.font = .textRegular03
descriptionLabel.textColor = .primary
userNameLabel.font = .title01
userNameLabel.textColor = .primary
birthLabel.font = .textRegular02
birthLabel.textColor = .primary
mbtiLabel.font = .textRegular02
mbtiLabel.textColor = .primary
instagramIDLabel.font = .textRegular02
instagramIDLabel.textColor = .primary
linkURLLabel.font = .textRegular02
linkURLLabel.textColor = .primary
}

func initCell(_ backgroundImage: String,
_ cardName: String,
_ detailCardName: String,
_ cardTitle: String,
_ cardDescription: String,
_ userName: String,
_ birth: String,
_ mbti: String,
_ instagramID: String,
_ linkImage: String,
_ linkText: String,
_ linkID: String) {
_ linkURL: String) {
if let bgImage = UIImage(named: backgroundImage) {
self.backgroundImageView.image = bgImage
}
self.cardNameLabel.text = cardName
self.detailCardNameLabel.text = detailCardName
self.titleLabel.text = cardTitle
self.descriptionLabel.text = cardDescription
self.userNameLabel.text = userName
self.birthLabel.text = birth
self.mbtiLabel.text = mbti
self.instagramIDLabel.text = instagramID
if let linkImage = UIImage(named: linkImage) {
self.linkImageView.image = linkImage
}
self.linkTextLabel.text = linkText
self.linkIDLabel.text = linkID
self.linkURLLabel.text = linkURL
}
}
Loading