Skip to content

Commit

Permalink
Merge pull request #114 from SINZAK/develop
Browse files Browse the repository at this point in the history
v1.0.1 pull request
  • Loading branch information
JongHoooon committed Jun 14, 2023
2 parents ea23b6e + be2b5df commit f0caac4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 19 deletions.
2 changes: 0 additions & 2 deletions Sinzak.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,6 @@
ED74A07A29F4F8F200F44AA2 /* AppleAuthAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppleAuthAPI.swift; sourceTree = "<group>"; };
ED74A07F29F4FABB00F44AA2 /* AppleAuthManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppleAuthManager.swift; sourceTree = "<group>"; };
ED74A08129F4FB7300F44AA2 /* AppleToken.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppleToken.swift; sourceTree = "<group>"; };
ED74A08329F520CF00F44AA2 /* TODO.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = TODO.md; sourceTree = "<group>"; };
ED75587F29E546F700A15977 /* DoubleCheckButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DoubleCheckButton.swift; sourceTree = "<group>"; };
ED75588229E7173900A15977 /* UniversityInfoVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UniversityInfoVM.swift; sourceTree = "<group>"; };
ED7F92D029DB0F2A00C55FBF /* SNSLoginDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SNSLoginDTO.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1191,7 +1190,6 @@
children = (
A2806120292F50FA005AE0B3 /* .swiftlint.yml */,
A23415C52927D7A9007DADE7 /* .gitignore */,
ED74A08329F520CF00F44AA2 /* TODO.md */,
A23415B02927D776007DADE7 /* Sinzak */,
A2F07847298AB0A7004A2B3F /* SinzakTests */,
A23415AF2927D776007DADE7 /* Products */,
Expand Down
27 changes: 13 additions & 14 deletions Sinzak/Scene/Write/WritePost/VC/WritePostVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ final class WritePostVC: SZVC {
private let disposeBag = DisposeBag()
private let viewModel: WritePostVM
private var keyboardHeight: CGFloat = 0.0
private var tapGestureRecognizer: UITapGestureRecognizer?

init(viewModel: WritePostVM, category: WriteCategory) {
self.viewModel = viewModel
Expand Down Expand Up @@ -89,11 +90,6 @@ private extension WritePostVC {
}

func bindInput() {

let tapContentViewGesture = UITapGestureRecognizer(target: self, action: #selector(endEditing))
mainView.contentView.addGestureRecognizer(tapContentViewGesture)
tapContentViewGesture.delegate = self

mainView.collectionView.rx.itemSelected
.asSignal()
.emit(
Expand All @@ -111,7 +107,7 @@ private extension WritePostVC {

let vc = PHPickerViewController(configuration: config)
vc.view.tintColor = CustomColor.red
vc.delegate = self
vc.delegate = owner
vc.modalPresentationStyle = .fullScreen

owner.present(vc, animated: true)
Expand Down Expand Up @@ -222,8 +218,14 @@ private extension WritePostVC {
owner.keyboardHeight = keyboardVisibleHeight
if keyboardVisibleHeight > 0 {
owner.mainView.remakeKeyboardShowLayout()
let tapGestureRecognizer = UITapGestureRecognizer(target: owner, action: #selector(owner.endEditing))
owner.mainView.contentView.addGestureRecognizer(tapGestureRecognizer)
tapGestureRecognizer.delegate = self
self.tapGestureRecognizer = tapGestureRecognizer
} else {
owner.mainView.remakeKeyboardNotShowLayout()
guard let tapGestureRecognizer = owner.tapGestureRecognizer else { return }
owner.mainView.contentView.removeGestureRecognizer(tapGestureRecognizer)
}

})
Expand Down Expand Up @@ -509,14 +511,11 @@ extension WritePostVC {
_ gestureRecognizer: UIGestureRecognizer,
shouldReceive touch: UITouch
) -> Bool {

var point = touch.location(in: mainView.contentView)
point = CGPoint(x: point.x, y: point.y * 1.25)

if mainView.collectionView.frame.contains(point) {
return false
} else {
return true
}
var point = touch.location(in: mainView.collectionView)
point = CGPoint(x: point.x, y: point.y)

guard mainView.collectionView.frame.contains(point) else { return true }
return false
}
}
4 changes: 1 addition & 3 deletions Sinzak/Scene/Write/WritePost/View/SelectedPhotoCVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import UIKit
import SnapKit
import Then
import RxSwift
import RxCocoa

final class SelectedPhotoCVC: UICollectionViewCell {
// MARK: - Properties
Expand All @@ -18,7 +16,7 @@ final class SelectedPhotoCVC: UICollectionViewCell {

// MARK: - UI

private let removePhotoButton = UIButton().then {
private lazy var removePhotoButton = UIButton().then {
$0.addTarget(self, action: #selector(deleteTapped), for: .touchUpInside)
$0.setImage(UIImage(named: "exclude"), for: .normal)
$0.imageView?.contentMode = .center
Expand Down

0 comments on commit f0caac4

Please sign in to comment.