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()