Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
eb53860
feat: KoinBottomSheet UIKit 컨테이너 추가
hgjwilly Oct 27, 2026
5027884
refactor: 바텀시트 콘텐츠 delegate 호환 준비
hgjwilly Oct 27, 2026
7f007df
refactor: 콜밴 목록 필터를 KoinBottomSheet로 전환
hgjwilly Oct 27, 2026
1e88b8e
refactor: 모집 목록 필터를 KoinBottomSheet로 전환
hgjwilly Oct 27, 2026
8d99a2f
refactor: 내 지원 목록 필터를 KoinBottomSheet로 전환
hgjwilly Oct 27, 2026
29f7395
refactor: 내 모집 글 목록 필터를 KoinBottomSheet로 전환
hgjwilly Oct 27, 2026
28d7704
refactor: 콜밴 장소 선택을 KoinBottomSheet로 전환
hgjwilly Oct 27, 2026
28a79b6
refactor: 콜밴 장소 바텀시트의 장소·직접 입력 영역을 스크롤 뷰로 감싸기
hgjwilly Oct 31, 2026
ffb604e
refactor: 식단 알림을 KoinBottomSheet로 전환
hgjwilly Oct 27, 2026
768b141
refactor: 기존 BottomSheetViewControllerB 제거
hgjwilly Oct 27, 2026
5f3f0f9
refactor: 콜밴 목록 바텀시트를 UIView 콘텐츠로 전환
hgjwilly Oct 27, 2026
7f66eb0
refactor: 콜밴 알림 삭제 시트를 새 콘텐츠로 전환
hgjwilly Oct 27, 2026
e683c27
refactor: 분실물 글쓰기 옵션을 UIView 시트로 전환
hgjwilly Oct 27, 2026
f6f24d5
refactor: 분실물 필터를 UIView 시트로 전환
hgjwilly Oct 27, 2026
2254081
refactor: 분실물 필터 바텀시트의 필터 영역을 스크롤 뷰로 감싸기
hgjwilly Oct 31, 2026
ca88382
refactor: 버스 지역 선택을 UIView 시트로 전환
hgjwilly Oct 27, 2026
e8b770a
refactor: 홈 배너를 UIView 시트로 전환
hgjwilly Oct 27, 2026
8f2364f
refactor: 기존 BottomSheetViewController 제거
hgjwilly Oct 27, 2026
d033938
refactor: 가게 정렬을 시스템 시트에서 KoinBottomSheet로 전환
hgjwilly Oct 28, 2026
d829193
fix: owner가 화면을 떠나면 바텀시트 정리
hgjwilly Nov 2, 2026
dea9e6e
chore: NewBannerView를 BannerView로 이름 변경
hgjwilly Nov 2, 2026
7bd9f95
chore: NewBannerCollectionView를 BannerCollectionView로 이름 변경
hgjwilly Nov 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions Koin/Core/Extensions/UIKit/UIViewController+KoinBottomSheet.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
//
// UIViewController+KoinBottomSheet.swift
// koin
//
// Created by 홍기정 on 10/28/26.
//

import UIKit
import SnapKit

extension UIViewController {
@discardableResult
func presentBottomSheet(
_ contentView: some KoinBottomSheetContent,
configuration: KoinBottomSheetConfiguration = .init()
) -> KoinBottomSheetController? {
guard let window = viewIfLoaded?.window else { return nil }
assert(contentView.superview == nil, "Create new content for every KoinBottomSheet presentation")
window.endEditing(true)

let host: UIViewController
switch configuration.style {
case .modal:
host = tabBarController ?? navigationController ?? self
case .nonModal:
host = self
}
// 닫히는 중인 시트는 애니메이션 동안 붙어 있지만, 활성 시트 조회에서는 빠진다.
activeBottomSheets.forEach { $0.dismissForReplacement() }

let sheet = KoinBottomSheetController(
contentViewController: KoinBottomSheetContentViewController(contentView: contentView),
owner: self,
configuration: configuration
)
contentView.delegate = sheet
host.addChild(sheet)
host.view.addSubview(sheet.view)
sheet.view.snp.makeConstraints { $0.edges.equalToSuperview() }
sheet.didMove(toParent: host)
sheet.presentSheet()
return sheet
}

func dismissBottomSheet() {
guard viewIfLoaded?.window != nil else { return }
let modalHost = tabBarController ?? navigationController ?? self
activeBottomSheets
.filter { $0.owner === self || $0.parent === modalHost }
.forEach { $0.dismiss() }
}

/// 같은 화면의 시트만 본다: 자신과 modal host의 직속 child.
private var activeBottomSheets: [KoinBottomSheetController] {
let modalHost = tabBarController ?? navigationController ?? self
let candidates = modalHost === self ? children : children + modalHost.children
return candidates
.compactMap { $0 as? KoinBottomSheetController }
.filter { $0.isActive }
}
}
247 changes: 0 additions & 247 deletions Koin/Core/View/UIKit/BottomSheetViewController.swift

This file was deleted.

Loading
Loading