Skip to content

Commit

Permalink
♻️#294: 마이페이지 리스트뷰 Height 조정 및 진입 시 Height 업데이트 선 호출 처리
Browse files Browse the repository at this point in the history
- 마이페이지 진입 시 Height 값과 이후 다른 탭(좋아요) 선택 후 Height 값(정상)이 달라 section 값 전달되고 선 호출 처리를 통해 임시 해결
  • Loading branch information
thoonk committed Jul 8, 2024
1 parent 5f485d9 commit 5b683f4
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ final class MyPageViewController: UIViewController, Toastable, Alertable {
self.configureUI()
self.bindAction()
self.bindViewModel()
self.configureSupplementaryViewRegistration()
}

override func viewWillAppear(_ animated: Bool) {
Expand Down Expand Up @@ -387,6 +386,8 @@ private extension MyPageViewController {
self.collectionViewHeightConstraint = $0.height.equalTo(1).constraint
}

configureSupplementaryViewRegistration()

// MARK: - Scroll To Top Button

self.view.addSubview(scrollToTopButton)
Expand Down Expand Up @@ -572,6 +573,7 @@ private extension MyPageViewController {

output.myMusicsSections
.bind(with: self) { owner, sections in
owner.updateCollectionViewHeight()
owner.displayMusicList(sections)
}
.disposed(by: disposeBag)
Expand Down Expand Up @@ -790,7 +792,7 @@ private extension MyPageViewController {
DispatchQueue.main.async { [weak self] in
guard let self else { return }
self.musicListCollectionView.layoutIfNeeded()
let contentHeight = self.musicListCollectionView.contentSize.height + 50
let contentHeight = self.musicListCollectionView.contentSize.height
self.collectionViewHeightConstraint?.update(offset: contentHeight)

UIView.animate(withDuration: 0.3) {
Expand Down

0 comments on commit 5b683f4

Please sign in to comment.