From 934367140b98ea50402cfe2fe049d3ed096ec7c0 Mon Sep 17 00:00:00 2001 From: dlwns33 Date: Tue, 28 Feb 2023 21:48:20 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=82=B4=20=EA=B7=BC=EC=B2=98=EC=9D=98?= =?UTF-8?q?=20=EB=AA=85=ED=95=A8=20=EB=84=A4=EB=B9=84=EB=B0=94=20(#371)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Contents.json | 23 ++++++++++++++++++ .../iconRefreshLocation.png | Bin 0 -> 281 bytes .../iconRefreshLocation@2x.png | Bin 0 -> 406 bytes .../iconRefreshLocation@3x.png | Bin 0 -> 563 bytes .../AroundMe/VC/AroundMeViewController.swift | 14 +++++++++++ .../CustomNavigationBar.swift | 6 ++--- 6 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconRefreshLocation.imageset/Contents.json create mode 100644 NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconRefreshLocation.imageset/iconRefreshLocation.png create mode 100644 NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconRefreshLocation.imageset/iconRefreshLocation@2x.png create mode 100644 NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconRefreshLocation.imageset/iconRefreshLocation@3x.png diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconRefreshLocation.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconRefreshLocation.imageset/Contents.json new file mode 100644 index 00000000..3ab459f0 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconRefreshLocation.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "iconRefreshLocation.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "iconRefreshLocation@2x.png", + "scale" : "2x" + }, + { + "scale" : "3x", + "idiom" : "universal", + "filename" : "iconRefreshLocation@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconRefreshLocation.imageset/iconRefreshLocation.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconRefreshLocation.imageset/iconRefreshLocation.png new file mode 100644 index 0000000000000000000000000000000000000000..b65db295a005170dc523eab541c65e28b2deb953 GIT binary patch literal 281 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaN3?zjj6;1;wmUKs7M+SzC{oH>NS%G}U;vjb? zhIQv;UIIC~0X`wF?gc*Dx`sLi23qK%@s^Xz3Yf>lhjs7$^XxbPR!NfT%cS z1JE=EzLFrnV1@<-g9!`H-*?Ct5V-K3BlvPXP^Q4s#W6(Ua&m%#@RlpK+)W#&@2UR& zj&sV{(sxPBn+2vE{uINw(D}XKj9DCNkC_})9$PaCOigD{dV0^6CGfoii}3{)W(`i^ z=2OP@&X-R963LmRvWYd}K*)23R86UZ6Z>v5JpIAw`=xDV;MwYTj_bZNrd(A`sks?_ Q4rn)nr>mdKI;Vst0DXa4BLDyZ literal 0 HcmV?d00001 diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconRefreshLocation.imageset/iconRefreshLocation@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconRefreshLocation.imageset/iconRefreshLocation@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..fce8cc62acf2cbf23f364f778f0204266afa6f12 GIT binary patch literal 406 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDB3?!H8JlO)ISkfJR9T^xl_H+M9WCijWi-X*q z7}lMWc?smG2l#}zx)=Cp>l$hs7-;DlYUvsP*$`4&4=7@wp=SUDKtb68$=g6JJS9PX z!3+%ow-eq^m~UI4ps?!cdyqX}JzX3_EKc7IHsn7TAh2)Rg-sH?Y@CUP9WD}99XHe7 zDyTI(CJ8&cCVdnB!)+Wo?Y;ZTZ7;3Yt8e_|TYLZR_jmWo!xz;%7r$j|E}Uk+yJF#@ z&$>r;WYygKDR6_?@oS3Quj4%jzAx#MIuMgn+Sz?#dgDy1n~T3}=GecE$#m(v2g@p& z_ZBtj2|I}1*(Ahfeys60tJfo?wR8LDdh#%YtS?NMaxyVfN4=@jLCZbm;B+Y!tp|#> zof^w?4DPwvCI+W$oA@$es@$iX1*{KL&Mj-(ePVm#yd%*M!!pcoUUuEPh5LHpil=3h qdM~qPDr|O}Xvkr9|3903pZe5OZ5zD9WDWrXfWgz%&t;ucLK6T3tDfZm literal 0 HcmV?d00001 diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconRefreshLocation.imageset/iconRefreshLocation@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconRefreshLocation.imageset/iconRefreshLocation@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..a1382bfa8eee1098edd9c6092941e3abec1f088d GIT binary patch literal 563 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xZ3?!EyURMI7SkfJR9T^xl_H+M9WCijWi-X*q z7}lMWc?slb1^9%xx)=Cp>l$k58ffbqXz3bi>l$bo7yv~;3_YL-n5_>Y^R{y7i+A@qX&<)^qd?vtZvSeWl^8ovajL7QTB|rOSGQH?#Y~V`}gO&v-f_{ z$-H#=@_Xy&6JA?*>u~JJ(|6f@Z%d(`oWbEQM-FjLOcI)5q4%62n$7QF^0|X^8%wkb ze7xShIeo40LG3jI!#Cl*mbXtnKOR17vsm%F;+#9lb8g$LuT48=&@S9xJ4L;O!R3}) z?bCgXe_p*xy_tJzzn0r9M&BeK&s7{fn&s}N?%1dJEV^P@;Bi#N({#(uyIc60L{{gv z3r$)Qq2V0FQStEnjov%2l+<}$CjH5mmQ>f0p1L*u+|*QYn~6uJPPOq~lXxxnvd!|a z`$=m~REB9Pri=dAmL~aF^2eraN@t4`-iAkA>)X2WgTe~DWM4f-VN(+ literal 0 HcmV?d00001 diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/AroundMe/VC/AroundMeViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/AroundMe/VC/AroundMeViewController.swift index f6f83d37..e0195ae7 100644 --- a/NADA-iOS-forRelease/Sources/ViewControllers/AroundMe/VC/AroundMeViewController.swift +++ b/NADA-iOS-forRelease/Sources/ViewControllers/AroundMe/VC/AroundMeViewController.swift @@ -19,11 +19,14 @@ final class AroundMeViewController: UIViewController { // MARK: - UI Components + private let navigationBar = CustomNavigationBar() + // MARK: - View Life Cycles override func viewDidLoad() { super.viewDidLoad() setUI() + setLayout() } } @@ -31,8 +34,19 @@ final class AroundMeViewController: UIViewController { extension AroundMeViewController { // MARK: - UI & Layout + private func setUI() { self.view.backgroundColor = .white self.navigationController?.navigationBar.isHidden = true + navigationBar.setUI("내 근처의 명함", leftImage: UIImage(named: "iconClear"), rightImage: UIImage(named: "iconRefreshLocation")) + } + + private func setLayout() { + view.addSubviews([navigationBar]) + + navigationBar.snp.makeConstraints { make in + make.top.leading.trailing.equalTo(self.view.safeAreaLayoutGuide) + make.height.equalTo(50) + } } } diff --git a/NADA-iOS-forRelease/Sources/Views/CustomNavigationBar/CustomNavigationBar.swift b/NADA-iOS-forRelease/Sources/Views/CustomNavigationBar/CustomNavigationBar.swift index 97a8460a..072f8570 100644 --- a/NADA-iOS-forRelease/Sources/Views/CustomNavigationBar/CustomNavigationBar.swift +++ b/NADA-iOS-forRelease/Sources/Views/CustomNavigationBar/CustomNavigationBar.swift @@ -17,7 +17,7 @@ import UIKit 2) 해당 ViewController로 가서 CustomNavigationBar를 상속받은 UIView 생성 (ex: navigationBar) 3) navigationBar.leftButtonAction = { 왼쪽버튼을 누르면 해야할 것 } 을 추가해요. 4) navigationBar.rightButtonAction = { 오른쪽버튼을 누르면 해야할 것 } 을 추가해요. - 5) func iconImage(leftImage: UIImage, rightImage: UIImage) 함수를 이용하여 왼쪽 아이템과 오른쪽 아이템을 바꿔주세요. + 5) func setUI(_ title: String?, leftImage: UIImage?, rightImage: UIImage?) 함수를 이용하여 왼쪽/오른쪽 아이템과 타이틀을 바꿔주세요. */ @@ -57,8 +57,8 @@ class CustomNavigationBar: UIView { func setUI(_ title: String?, leftImage: UIImage?, rightImage: UIImage?) { titleLabel.text = title - leftButton.setImage(leftImage?.withRenderingMode(.alwaysTemplate), for: .normal) - rightButton.setImage(rightImage?.withRenderingMode(.alwaysTemplate), for: .normal) + leftButton.setImage(leftImage?.withRenderingMode(.alwaysOriginal), for: .normal) + rightButton.setImage(rightImage?.withRenderingMode(.alwaysOriginal), for: .normal) } private func setLayout() {