Skip to content

Commit

Permalink
[Merge] #303 - BottomSheet 확장 스크롤 위치 복원
Browse files Browse the repository at this point in the history
[Fix] #302 - BottomSheet 확장 스크롤 위치 복원
  • Loading branch information
mcrkgus authored Nov 20, 2024
2 parents 24d82b1 + ab92a76 commit a2c4148
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ private extension HomeViewController {

rootView.bottomSheetView.totalListCollectionView.reloadData()
hideMarkerInfoCard()
rootView.bottomSheetView.viewLayoutIfNeededWithDownAnimation()
}

func handleHankkiListResult(success: Bool, isEmpty: Bool) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final class TotalListBottomSheetView: BaseView {

weak var homeViewController: HomeViewController?
weak var delegate: TotalListBottomSheetViewDelegate?

// MARK: - UI Components

private let bottomSheetHandlerView: UIView = UIView()
Expand Down Expand Up @@ -179,12 +179,12 @@ extension TotalListBottomSheetView {
animations: {
self.transform = .init(translationX: 0, y: -(UIScreen.getDeviceHeight() * 0.4))
}, completion: { [weak self] _ in
self?.isBottomSheetUp = true
if let collectionView = self?.totalListCollectionView {
collectionView.contentInset = .zero
collectionView.scrollIndicatorInsets = .zero

}
guard let self = self else { return }
self.isBottomSheetUp = true
if let homeVC = self.homeViewController {
homeVC.lastScrollPosition = self.totalListCollectionView.contentOffset
self.totalListCollectionView.setContentOffset(homeVC.lastScrollPosition, animated: false)
} else { }
})
}

Expand Down

0 comments on commit a2c4148

Please sign in to comment.