From 3ffad1deaf92c3c8cd6342a7b30457d8ffe7fd67 Mon Sep 17 00:00:00 2001 From: Danna Lee Date: Fri, 2 Apr 2021 15:59:04 +0900 Subject: [PATCH 1/5] =?UTF-8?q?[fix]=20=EC=97=94=ED=84=B0=20=EC=9E=85?= =?UTF-8?q?=EB=A0=A5=20=EC=8B=9C=20=EB=89=B4=EB=9D=BC=EC=9D=B8=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/VCs/ModifyWeathy/ModifyWeathyTextVC.swift | 8 ++++---- Weathy/Weathy/Sources/VCs/Record/RecordTextVC.swift | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Weathy/Weathy/Sources/VCs/ModifyWeathy/ModifyWeathyTextVC.swift b/Weathy/Weathy/Sources/VCs/ModifyWeathy/ModifyWeathyTextVC.swift index e3a7e5f2..a66585fd 100644 --- a/Weathy/Weathy/Sources/VCs/ModifyWeathy/ModifyWeathyTextVC.swift +++ b/Weathy/Weathy/Sources/VCs/ModifyWeathy/ModifyWeathyTextVC.swift @@ -520,10 +520,10 @@ extension ModifyWeathyTextVC: UITextViewDelegate { func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool { - if text == "\n" { - textView.resignFirstResponder() - } - +// if text == "\n" { +// textView.resignFirstResponder() +// } +// return true } diff --git a/Weathy/Weathy/Sources/VCs/Record/RecordTextVC.swift b/Weathy/Weathy/Sources/VCs/Record/RecordTextVC.swift index d53da3a6..297516e8 100644 --- a/Weathy/Weathy/Sources/VCs/Record/RecordTextVC.swift +++ b/Weathy/Weathy/Sources/VCs/Record/RecordTextVC.swift @@ -562,9 +562,9 @@ extension RecordTextVC: UITextViewDelegate { func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool { - if text == "\n" { - textView.resignFirstResponder() - } +// if text == "\n" { +// textView.resignFirstResponder() +// } return true } From 463a1e8f14b47a8f69309604042843761d3884e2 Mon Sep 17 00:00:00 2001 From: inaeLee Date: Fri, 2 Apr 2021 16:34:29 +0900 Subject: [PATCH 2/5] =?UTF-8?q?[add]=20=EB=8B=B9=EA=B2=A8=EC=84=9C=20?= =?UTF-8?q?=EC=83=88=EB=A1=9C=EA=B3=A0=EC=B9=A8=20(refreshControl)=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Weathy/Weathy/Sources/VCs/Main/MainVC.swift | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Weathy/Weathy/Sources/VCs/Main/MainVC.swift b/Weathy/Weathy/Sources/VCs/Main/MainVC.swift index d09ba287..5087b9b7 100644 --- a/Weathy/Weathy/Sources/VCs/Main/MainVC.swift +++ b/Weathy/Weathy/Sources/VCs/Main/MainVC.swift @@ -12,6 +12,7 @@ class MainVC: UIViewController { let appDelegate = UIApplication.shared.delegate as? AppDelegate var lastContentOffset: CGFloat = 0.0 + var refreshControl: UIRefreshControl? // gps 버튼 활성화 여부 var isOnGPS: Bool = false { @@ -109,6 +110,11 @@ class MainVC: UIViewController { blankDownImage() moveWeatherImage() + + refreshControl = UIRefreshControl() + refreshControl?.addTarget(self, action: #selector(pullToRefresh), for: .valueChanged) + mainScrollView.refreshControl = refreshControl + mainScrollView.addSubview(refreshControl ?? UIRefreshControl()) } override func viewDidLoad() { @@ -148,6 +154,7 @@ class MainVC: UIViewController { mainScrollView.isPagingEnabled = true mainScrollView.backgroundColor = .clear mainScrollView.showsVerticalScrollIndicator = false + mainScrollView.delegate = self mainTopScrollView.showsVerticalScrollIndicator = false mainTopScrollView.delegate = self @@ -754,6 +761,12 @@ class MainVC: UIViewController { } } } + + @objc func pullToRefresh(_ sender: UIRefreshControl) { + checkLocationAndGetWeatherData() + + sender.endRefreshing() + } } // MARK: - UICollectionViewDataSource From 24cb634998178a0fc6d8020317e9e94df1c631e6 Mon Sep 17 00:00:00 2001 From: seu11ee Date: Fri, 2 Apr 2021 17:33:53 +0900 Subject: [PATCH 3/5] =?UTF-8?q?[chore]=20=EB=A6=B4=EB=A6=AC=EC=A6=88=20?= =?UTF-8?q?=EB=B2=84=EC=A0=84=201.1.0(2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Weathy/Weathy.xcodeproj/project.pbxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Weathy/Weathy.xcodeproj/project.pbxproj b/Weathy/Weathy.xcodeproj/project.pbxproj index 0b366a10..7ea18b3e 100644 --- a/Weathy/Weathy.xcodeproj/project.pbxproj +++ b/Weathy/Weathy.xcodeproj/project.pbxproj @@ -1258,7 +1258,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = 4YXV56BSN6; INFOPLIST_FILE = Weathy/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.0; @@ -1266,7 +1266,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.5; + MARKETING_VERSION = 1.1.0; PRODUCT_BUNDLE_IDENTIFIER = com.weathy.weathy; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; @@ -1281,7 +1281,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = 4YXV56BSN6; INFOPLIST_FILE = Weathy/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.0; @@ -1289,7 +1289,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.5; + MARKETING_VERSION = 1.1.0; PRODUCT_BUNDLE_IDENTIFIER = com.weathy.weathy; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; From 2674d27d5efaa32d93f88fe41e6018e615342c6a Mon Sep 17 00:00:00 2001 From: inaeLee Date: Fri, 2 Apr 2021 17:35:52 +0900 Subject: [PATCH 4/5] =?UTF-8?q?[fix]=20=EB=A7=A8=20=EC=B2=98=EC=9D=8C=20?= =?UTF-8?q?=EC=A7=84=EC=9E=85=20=EC=8B=9C=20refresh=20=EC=95=88=EB=90=98?= =?UTF-8?q?=EB=8A=94=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Weathy/Weathy/Sources/VCs/Main/MainVC.swift | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Weathy/Weathy/Sources/VCs/Main/MainVC.swift b/Weathy/Weathy/Sources/VCs/Main/MainVC.swift index 5087b9b7..070fbef5 100644 --- a/Weathy/Weathy/Sources/VCs/Main/MainVC.swift +++ b/Weathy/Weathy/Sources/VCs/Main/MainVC.swift @@ -12,7 +12,12 @@ class MainVC: UIViewController { let appDelegate = UIApplication.shared.delegate as? AppDelegate var lastContentOffset: CGFloat = 0.0 - var refreshControl: UIRefreshControl? + lazy var refreshControl: UIRefreshControl = { + let refresh = UIRefreshControl() + refresh.addTarget(self, action: #selector(pullToRefresh(_:)), for: .valueChanged) + + return refresh + }() // gps 버튼 활성화 여부 var isOnGPS: Bool = false { @@ -110,11 +115,6 @@ class MainVC: UIViewController { blankDownImage() moveWeatherImage() - - refreshControl = UIRefreshControl() - refreshControl?.addTarget(self, action: #selector(pullToRefresh), for: .valueChanged) - mainScrollView.refreshControl = refreshControl - mainScrollView.addSubview(refreshControl ?? UIRefreshControl()) } override func viewDidLoad() { @@ -125,6 +125,12 @@ class MainVC: UIViewController { NotificationCenter.default.addObserver(self, selector: #selector(appMovedToForeground), name: UIApplication.willEnterForegroundNotification, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(receiveSearchData), name: NSNotification.Name(rawValue: "search"), object: nil) + + mainScrollView.refreshControl = refreshControl + } + + override func viewDidAppear(_ animated: Bool) { + refreshControl.didMoveToSuperview() } override func viewSafeAreaInsetsDidChange() { From 32f475b8db9fa95c69bd138a38507b9087f8198e Mon Sep 17 00:00:00 2001 From: seu11ee Date: Fri, 2 Apr 2021 17:43:18 +0900 Subject: [PATCH 5/5] =?UTF-8?q?[chore]=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=ED=94=8C=EB=9D=BC=EC=9D=B4=ED=8A=B8=20=EB=B2=84=EC=A0=84=201.1?= =?UTF-8?q?.6(1)=20=EC=95=B1=EC=8A=A4=ED=86=A0=EC=96=B4=201.1.0(1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Weathy/Weathy.xcodeproj/project.pbxproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Weathy/Weathy.xcodeproj/project.pbxproj b/Weathy/Weathy.xcodeproj/project.pbxproj index 7ea18b3e..d77ae09c 100644 --- a/Weathy/Weathy.xcodeproj/project.pbxproj +++ b/Weathy/Weathy.xcodeproj/project.pbxproj @@ -1258,7 +1258,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 4YXV56BSN6; INFOPLIST_FILE = Weathy/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.0; @@ -1266,7 +1266,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.0; + MARKETING_VERSION = 1.1.6; PRODUCT_BUNDLE_IDENTIFIER = com.weathy.weathy; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; @@ -1281,7 +1281,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 4YXV56BSN6; INFOPLIST_FILE = Weathy/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.0; @@ -1289,7 +1289,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.0; + MARKETING_VERSION = 1.1.6; PRODUCT_BUNDLE_IDENTIFIER = com.weathy.weathy; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0;