Skip to content

Commit

Permalink
[ADD] TeamNADA#78 - 명함생성 뷰 수정
Browse files Browse the repository at this point in the history
### Descriptions
- iconArrow 다크모드 에셋 추가
- alert 창 extension
- FrontCardCell, RequiredFlavorCollectionViewCell 다크모드 적용
- BackgroundCollectionViewCell 수정 뷰 적용
- Front & BackCardCreationCollectionViewCell 수정 뷰 적용

### fixme
- @IBDesignable 에러 수정해야함

### todo
- 버튼 iOS 13,15 대응
  • Loading branch information
hyun99999 committed Nov 26, 2021
1 parent 7b38816 commit 74d153d
Show file tree
Hide file tree
Showing 18 changed files with 255 additions and 160 deletions.
11 changes: 4 additions & 7 deletions NADA-iOS-forRelease.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
39811490273BEBCE00E28630 /* CardListRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3981148F273BEBCE00E28630 /* CardListRequest.swift */; };
398413B7274A7A1E005550BC /* AddGroupBottomSheetViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 398413B6274A7A1E005550BC /* AddGroupBottomSheetViewController.swift */; };
399C55DF2711949D00845A54 /* CGPoint+Distance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 399C55DE2711949D00845A54 /* CGPoint+Distance.swift */; };
39A8DEA3274E6436005DE7C8 /* UITextField+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39A8DEA2274E6436005DE7C8 /* UITextField+Extension.swift */; };
39C1E88F270EC762006D2089 /* UIColor+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39C1E88E270EC762006D2089 /* UIColor+Extension.swift */; };
39D13565273FDB9C00B1A148 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39D13564273FDB9C00B1A148 /* User.swift */; };
39D13568273FDCB800B1A148 /* UserWithTokenRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39D13567273FDCB800B1A148 /* UserWithTokenRequest.swift */; };
Expand All @@ -58,7 +57,6 @@
77AA68EA273E0EC4009C89B0 /* CardAddInGroupRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77AA68E9273E0EC4009C89B0 /* CardAddInGroupRequest.swift */; };
DBBB91E1639641F40C5B4416 /* Pods_NADA_iOS_forRelease.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A2183AE0E469153221624A0 /* Pods_NADA_iOS_forRelease.framework */; };
F811720027383097002742CF /* ChangeGroupRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F81171FF27383097002742CF /* ChangeGroupRequest.swift */; };
F81A6833274F49A700B80A4F /* UITextField+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F81A6832274F49A700B80A4F /* UITextField+Extension.swift */; };
F822E7A92709CEB60020452C /* Notification.swift in Sources */ = {isa = PBXBuildFile; fileRef = F822E7A82709CEB60020452C /* Notification.swift */; };
F82FF81D2701EBCE00E57F8B /* CardCreation.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F82FF81C2701EBCE00E57F8B /* CardCreation.storyboard */; };
F82FF8252702000000E57F8B /* RequiredFlavorCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F82FF8232702000000E57F8B /* RequiredFlavorCollectionViewCell.swift */; };
Expand All @@ -76,6 +74,7 @@
F858079F2700354E00872484 /* BackgroundCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F858079D2700354E00872484 /* BackgroundCollectionViewCell.xib */; };
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 */; };
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 @@ -138,7 +137,6 @@
3981148F273BEBCE00E28630 /* CardListRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardListRequest.swift; sourceTree = "<group>"; };
398413B6274A7A1E005550BC /* AddGroupBottomSheetViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddGroupBottomSheetViewController.swift; sourceTree = "<group>"; };
399C55DE2711949D00845A54 /* CGPoint+Distance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGPoint+Distance.swift"; sourceTree = "<group>"; };
39A8DEA2274E6436005DE7C8 /* UITextField+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITextField+Extension.swift"; sourceTree = "<group>"; };
39C1E88E270EC762006D2089 /* UIColor+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Extension.swift"; sourceTree = "<group>"; };
39D13564273FDB9C00B1A148 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = "<group>"; };
39D13567273FDCB800B1A148 /* UserWithTokenRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserWithTokenRequest.swift; sourceTree = "<group>"; };
Expand All @@ -158,7 +156,6 @@
77AA68E9273E0EC4009C89B0 /* CardAddInGroupRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardAddInGroupRequest.swift; sourceTree = "<group>"; };
7F4EE1D042EC783FA8528743 /* Pods-NADA-iOS-forRelease.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NADA-iOS-forRelease.debug.xcconfig"; path = "Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease.debug.xcconfig"; sourceTree = "<group>"; };
F81171FF27383097002742CF /* ChangeGroupRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChangeGroupRequest.swift; sourceTree = "<group>"; };
F81A6832274F49A700B80A4F /* UITextField+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITextField+Extension.swift"; sourceTree = "<group>"; };
F822E7A82709CEB60020452C /* Notification.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Notification.swift; sourceTree = "<group>"; };
F82FF81C2701EBCE00E57F8B /* CardCreation.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = CardCreation.storyboard; sourceTree = "<group>"; };
F82FF8232702000000E57F8B /* RequiredFlavorCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RequiredFlavorCollectionViewCell.swift; sourceTree = "<group>"; };
Expand All @@ -176,6 +173,7 @@
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>"; };
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>"; };
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 @@ -705,12 +703,11 @@
children = (
3909242E26FA15E800236C51 /* UIView+Extension.swift */,
39488E342706E17200BDC917 /* UIAlertController+Extension.swift */,
39A8DEA2274E6436005DE7C8 /* UITextField+Extension.swift */,
39007F2B27080D8200E7143E /* UIViewController+Extension.swift */,
39D2E12F270B43DA00AD0889 /* UIFont+Extension.swift */,
39C1E88E270EC762006D2089 /* UIColor+Extension.swift */,
399C55DE2711949D00845A54 /* CGPoint+Distance.swift */,
F81A6832274F49A700B80A4F /* UITextField+Extension.swift */,
F8719DDA274F92E90081AD51 /* UITextField+Extension.swift */,
);
path = Extensions;
sourceTree = "<group>";
Expand Down Expand Up @@ -881,7 +878,6 @@
F8C83FB6272F9E380009DF0D /* UtilService.swift in Sources */,
3958F239270FFBBF00B100B2 /* GroupViewController.swift in Sources */,
3909242F26FA15E800236C51 /* UIView+Extension.swift in Sources */,
39A8DEA3274E6436005DE7C8 /* UITextField+Extension.swift in Sources */,
39523E09270184A700536900 /* CardListViewController.swift in Sources */,
F85711A5274A6B2200F59F0B /* CardCreationPreviewViewController.swift in Sources */,
777FF89B27359B7800BF69D3 /* Groups.swift in Sources */,
Expand Down Expand Up @@ -911,6 +907,7 @@
F8C83FBB272F9F370009DF0D /* NetworkResult.swift in Sources */,
39D2E130270B43DA00AD0889 /* UIFont+Extension.swift in Sources */,
39523E5B2701A48900536900 /* CardListTableViewCell.swift in Sources */,
F8719DDB274F92E90081AD51 /* UITextField+Extension.swift in Sources */,
F8A9FE1A2743DC6B00BC60CE /* CardListInGroupRequest.swift in Sources */,
3981148E273BEBB300E28630 /* CardListEditRequest.swift in Sources */,
39D88B6B274600B100A72164 /* CommonBottomSheetViewController.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,56 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "iconArrow.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "iconArrow-1.png",
"idiom" : "universal",
"scale" : "2x",
"filename" : "iconArrow@2x.png"
"scale" : "1x"
},
{
"filename" : "iconArrow@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "iconArrow@2x-1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "iconArrow@3x.png",
"idiom" : "universal",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "iconArrow@3x-1.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}
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
Expand Up @@ -10,15 +10,18 @@ import UIKit

extension UIViewController {

// Common Alert
func makeAlert(title: String,
message: String,
cancelAction: ((UIAlertAction) -> Void)? = nil,
deleteAction: ((UIAlertAction) -> Void)?,
completion: (() -> Void)? = nil) {
/// 취소+삭제 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)
let alertViewController = UIAlertController(title: title,
message: message,
preferredStyle: .alert)

// FIXME: - 민재선배 아래주석 삭제해도 되나요??
// alertViewController.setTitle(font: UIFont.boldSystemFont(ofSize: 17), color: UIColor.white)
// alertViewController.setMessage(font: UIFont.systemFont(ofSize: 13), color: UIColor.white)
// alertViewController.setTint(color: .mainBlue)
Expand All @@ -34,4 +37,37 @@ extension UIViewController {
self.present(alertViewController, animated: true, completion: completion)
}

/// 확인+취소 UIAlertController
func makeOKCancelAlert(title: String,
message: String,
okAction: ((UIAlertAction) -> Void)?,
cancelAction: ((UIAlertAction) -> Void)? = nil,
completion: (() -> Void)? = nil) {
let alertViewController = UIAlertController(title: title,
message: message,
preferredStyle: .alert)

let okAction = UIAlertAction(title: "확인", style: .default, handler: okAction)
alertViewController.addAction(okAction)

let cancelAction = UIAlertAction(title: "취소", style: .cancel, handler: cancelAction)
alertViewController.addAction(cancelAction)

self.present(alertViewController, animated: true, completion: completion)
}

/// 확인 UIAlertController
func makeOKAlert(title: String,
message: String,
okAction: ((UIAlertAction) -> Void)? = nil,
completion: (() -> Void)? = nil) {
let alertViewController = UIAlertController(title: title,
message: message,
preferredStyle: .alert)

let okAction = UIAlertAction(title: "확인", style: .default, handler: okAction)
alertViewController.addAction(okAction)

self.present(alertViewController, animated: true, completion: completion)
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?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="retina6_1" orientation="portrait" appearance="light"/>
<device id="retina5_9" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
Expand All @@ -15,11 +15,11 @@
<objects>
<viewController storyboardIdentifier="CardCreationViewController" id="Y6W-OH-hqX" customClass="CardCreationViewController" 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="414" height="896"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tbX-yg-azh">
<rect key="frame" x="186.5" y="61" width="41.5" height="20.5"/>
<rect key="frame" x="166.66666666666666" y="60.999999999999993" width="41.666666666666657" height="20.666666666666664"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
Expand All @@ -44,7 +44,7 @@
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RJP-GW-J4W">
<rect key="frame" x="28" y="788" width="358" height="54"/>
<rect key="frame" x="28" y="724" width="319" height="54"/>
<constraints>
<constraint firstAttribute="height" constant="54" id="5Vp-dw-6P6"/>
</constraints>
Expand All @@ -66,10 +66,10 @@
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Wd4-Tx-rSs">
<rect key="frame" x="0.0" y="168" width="414" height="592"/>
<rect key="frame" x="0.0" y="162" width="375" height="550"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="PLB-cM-M8s">
<rect key="frame" x="0.0" y="0.0" width="414" height="592"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="550"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<collectionViewFlowLayout key="collectionViewLayout" automaticEstimatedItemSize="YES" minimumLineSpacing="10" minimumInteritemSpacing="10" id="RWl-ol-Bps">
<size key="itemSize" width="128" height="128"/>
Expand Down Expand Up @@ -110,9 +110,9 @@
<constraint firstItem="yP6-6Y-BPF" firstAttribute="leading" secondItem="q7k-m0-xi2" secondAttribute="trailing" constant="30" id="GED-As-RPG"/>
<constraint firstItem="q7k-m0-xi2" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" constant="25" id="OMc-0v-gBM"/>
<constraint firstItem="nZD-YQ-z5l" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" constant="25" id="SXi-JC-xa6"/>
<constraint firstItem="vDu-zF-Fre" firstAttribute="bottom" secondItem="RJP-GW-J4W" secondAttribute="bottom" constant="20" id="XXg-4Z-w3c"/>
<constraint firstItem="RJP-GW-J4W" firstAttribute="top" secondItem="PLB-cM-M8s" secondAttribute="bottom" constant="28" id="c0j-jn-N86"/>
<constraint firstItem="Wd4-Tx-rSs" firstAttribute="top" secondItem="gBB-hQ-SyS" secondAttribute="bottom" constant="18" id="h9M-yS-qit"/>
<constraint firstItem="vDu-zF-Fre" firstAttribute="bottom" secondItem="RJP-GW-J4W" secondAttribute="bottom" id="XXg-4Z-w3c"/>
<constraint firstItem="RJP-GW-J4W" firstAttribute="top" secondItem="PLB-cM-M8s" secondAttribute="bottom" constant="12" id="c0j-jn-N86"/>
<constraint firstItem="Wd4-Tx-rSs" firstAttribute="top" secondItem="gBB-hQ-SyS" secondAttribute="bottom" constant="12" id="h9M-yS-qit"/>
<constraint firstItem="nZD-YQ-z5l" firstAttribute="top" secondItem="vDu-zF-Fre" secondAttribute="top" constant="15" id="jgP-Of-eC0"/>
<constraint firstItem="yP6-6Y-BPF" firstAttribute="centerY" secondItem="q7k-m0-xi2" secondAttribute="centerY" id="nzF-Df-pZK"/>
<constraint firstItem="gBB-hQ-SyS" firstAttribute="trailing" secondItem="q7k-m0-xi2" secondAttribute="trailing" constant="5" id="oCK-mc-g4U"/>
Expand Down
Loading

0 comments on commit 74d153d

Please sign in to comment.