From 002a8ad24157e06d970a093385adfa03fd4b21b1 Mon Sep 17 00:00:00 2001 From: Minsung Kim Date: Sun, 17 Nov 2024 20:36:27 +0900 Subject: [PATCH] =?UTF-8?q?[Chore/#288]=20=EC=BA=90=EB=A6=AD=ED=84=B0=20?= =?UTF-8?q?=EC=84=A0=ED=86=A1=20=EB=B7=B0=20=EC=98=A4=ED=86=A0=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=EC=95=84=EC=9B=83=20=EC=BD=94=EB=93=9C=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Chat/CharacterChat/ORBCharacterChatView.swift | 7 +++---- .../CharacterChat/ORBCharacterChatViewController.swift | 6 ++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Offroad-iOS/Offroad-iOS/Presentation/Chat/CharacterChat/ORBCharacterChatView.swift b/Offroad-iOS/Offroad-iOS/Presentation/Chat/CharacterChat/ORBCharacterChatView.swift index 2279db4e..f37314b7 100644 --- a/Offroad-iOS/Offroad-iOS/Presentation/Chat/CharacterChat/ORBCharacterChatView.swift +++ b/Offroad-iOS/Offroad-iOS/Presentation/Chat/CharacterChat/ORBCharacterChatView.swift @@ -15,8 +15,7 @@ final class ORBCharacterChatView: UIView { //MARK: - Properties - lazy var characterChatBoxTopConstraint = characterChatBox.topAnchor.constraint(equalTo: topAnchor, constant: 74) - lazy var characterChatBoxBottomConstraint = characterChatBox.bottomAnchor.constraint(equalTo: topAnchor) + lazy var characterChatBoxTopConstraint = characterChatBox.topAnchor.constraint(equalTo: topAnchor) lazy var userChatViewBottomConstraint = userChatView.bottomAnchor.constraint(equalTo: bottomAnchor, constant: 160) lazy var userChatInputViewHeightConstraint = userChatInputView.heightAnchor.constraint(equalToConstant: 37) lazy var userChatDisplayViewHeightConstraint = userChatDisplayView.heightAnchor.constraint(equalToConstant: 24) @@ -58,8 +57,8 @@ extension ORBCharacterChatView { //MARK: - Layout Func private func setupLayout() { - characterChatBoxTopConstraint.isActive = false - characterChatBoxBottomConstraint.isActive = true + characterChatBoxTopConstraint.constant = -150 + characterChatBoxTopConstraint.isActive = true characterChatBox.snp.makeConstraints { make in make.horizontalEdges.equalToSuperview().inset(24) make.height.greaterThanOrEqualTo(58) diff --git a/Offroad-iOS/Offroad-iOS/Presentation/Chat/CharacterChat/ORBCharacterChatViewController.swift b/Offroad-iOS/Offroad-iOS/Presentation/Chat/CharacterChat/ORBCharacterChatViewController.swift index 6c0ba453..6b0ddadf 100644 --- a/Offroad-iOS/Offroad-iOS/Presentation/Chat/CharacterChat/ORBCharacterChatViewController.swift +++ b/Offroad-iOS/Offroad-iOS/Presentation/Chat/CharacterChat/ORBCharacterChatViewController.swift @@ -194,8 +194,7 @@ extension ORBCharacterChatViewController { characterChatBoxPositionAnimator.addAnimations { [weak self] in guard let self else { return } self.rootView.characterChatBox.transform = CGAffineTransform.identity - self.rootView.characterChatBoxBottomConstraint.isActive = false - self.rootView.characterChatBoxTopConstraint.isActive = true + self.rootView.characterChatBoxTopConstraint.constant = 74 self.rootView.layoutIfNeeded() } characterChatBoxPositionAnimator.startAnimation() @@ -206,8 +205,7 @@ extension ORBCharacterChatViewController { characterChatBoxPositionAnimator.addAnimations { [weak self] in guard let self else { return } self.rootView.characterChatBox.transform = CGAffineTransform.identity - self.rootView.characterChatBoxTopConstraint.isActive = false - self.rootView.characterChatBoxBottomConstraint.isActive = true + self.rootView.characterChatBoxTopConstraint.constant = -self.rootView.characterChatBox.frame.height self.rootView.layoutIfNeeded() } characterChatBoxPositionAnimator.startAnimation()