Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- panorama view
- @sendable
- completion handler
- 뷰 생명주기
- react
- 360도 이미지 뷰어
- 뷰 정체성
- React Native
- Android
- 앱 성능 개선
- 라이브러리 없이
- 파노라마 뷰
- 스켈레톤 통합
- 360도 이미지
- React-Native
- data driven construct
- 구조적 정체성
- presentationbackgroundinteraction
- ios
- 360도 뷰어
- ssot
- SwiftUI
- 네이티브
- launch screen
- 리액트 네이티브
- requirenativecomponent
- native
- 리액트
- react-native-fast-image
- 명시적 정체성
Archives
- Today
- Total
Neoself의 기술 블로그
[SwiftUI] 바텀시트 외부영역의 어두워짐 효과 제거하기 본문
SwiftUI에서는 바텀시트 UI를 위해 .sheet() 뷰 수정자를 제공하고 있습니다. 개발자는 해당 수정자에 SwiftUI 뷰를 클로저 내부에 선언함으로써, 자연스러운 애니메이션 효과와 함께 원하는 뷰를 부모 뷰 상단에 표시할 수 있게 됩니다.
하지만, .sheet 뷰 수정자의 기본형태를 사용할 경우, 바텀시트 표시와 함께 바텀시트 외부 배경또한 어두워지게 됩니다.
.sheet(isPresented: $isDetailPresent) {
ExampleBottomSheet()
.presentationBackgroundInteraction(.enabled)
}
하지만, 부모 뷰에 대한 상호작용 가능여부를 조정하는 위 뷰 수정자를 .enabled로 설정하게 되면, 외부영역에 대한 상호작용이 가능해질 뿐만 아니라, 아래와 같이 바텀시트 외부영역에 대해 Dimming 처리되지 않게 됩니다.
감사합니다.
Reference
https://www.appcoda.com/swiftui-bottom-sheet-background/
Customizing SwiftUI Bottom Sheet's Background and Scrolling Behaviour
Since the release of iOS 16, it’s easy to create an interactive bottom sheet using SwiftUI. All you need to do is to embed a modifier called presentationDetents in a Sheet view. Earlier, we published a detailed tutorial to walk you through the API. Howev
www.appcoda.com
'개발지식 정리 > Swift' 카테고리의 다른 글
[SwiftUI] 화면별 제스처를 통한 뒤로가기 활성화 여부 제어하기 (1) | 2025.06.17 |
---|---|
[SwiftUI] Navigation Router 패턴: 복잡한 네비게이션 플로우 관리하기 (1) | 2025.06.11 |
Swift Closure 정리 (0) | 2025.04.07 |
Kingfisher에서 Swift 동시성 모델을 도입한 NeoImage 라이브러리 구현기 (0) | 2025.03.16 |
Kingfisher 라이브러리 내부 콜백 구조 분석하기 (0) | 2025.03.13 |