Skip to content

Commit

Permalink
Merge pull request #264 from TeamWeathy/develop
Browse files Browse the repository at this point in the history
v1.1.0
  • Loading branch information
seu11ee committed Apr 2, 2021
2 parents bcdb9b6 + 32f475b commit c41340b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Weathy/Weathy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.5;
MARKETING_VERSION = 1.1.6;
PRODUCT_BUNDLE_IDENTIFIER = com.weathy.weathy;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -1289,7 +1289,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.5;
MARKETING_VERSION = 1.1.6;
PRODUCT_BUNDLE_IDENTIFIER = com.weathy.weathy;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand Down
19 changes: 19 additions & 0 deletions Weathy/Weathy/Sources/VCs/Main/MainVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ class MainVC: UIViewController {

let appDelegate = UIApplication.shared.delegate as? AppDelegate
var lastContentOffset: CGFloat = 0.0
lazy var refreshControl: UIRefreshControl = {
let refresh = UIRefreshControl()
refresh.addTarget(self, action: #selector(pullToRefresh(_:)), for: .valueChanged)

return refresh
}()

// gps 버튼 활성화 여부
var isOnGPS: Bool = false {
Expand Down Expand Up @@ -119,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() {
Expand Down Expand Up @@ -148,6 +160,7 @@ class MainVC: UIViewController {
mainScrollView.isPagingEnabled = true
mainScrollView.backgroundColor = .clear
mainScrollView.showsVerticalScrollIndicator = false
mainScrollView.delegate = self
mainTopScrollView.showsVerticalScrollIndicator = false
mainTopScrollView.delegate = self

Expand Down Expand Up @@ -754,6 +767,12 @@ class MainVC: UIViewController {
}
}
}

@objc func pullToRefresh(_ sender: UIRefreshControl) {
checkLocationAndGetWeatherData()

sender.endRefreshing()
}
}

// MARK: - UICollectionViewDataSource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
6 changes: 3 additions & 3 deletions Weathy/Weathy/Sources/VCs/Record/RecordTextVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit c41340b

Please sign in to comment.