티스토리 뷰
ZStack은 Stack안에 있는 자식 뷰들을 z축으로 중첩시켜주는 view 입니다.
실제 쓰이는 경우들을 알게 되어서 정리합니다-!
[1] 카메라와 컨트롤
이런 카메라 앱을 만든다고 할때,
카메라뷰랑 컨트롤 버튼들(파란네모친 영역)를 zstack을 이용하여 동시에 띄울 수 있습니다.
더불어 컨트롤뷰의 HStack(갤러리 열기, 촬영, 필터 버튼들이 있음)를 bottom에서부터 height 200으로 위치잡아주고 싶다면
Spacer를 활용할수있습니다. (신기)
[2] SwiftUI의 Fullscreen Modal을 띄울때
SwiftUI에서는 현재 fullscreen 모달을 띄울 수 있는 설정이 없습니다..😭
그래서 zstack을 활용해서 fullscreen presentation을 한 것 처럼 보이게 하시더라구요...!!
forums.developer.apple.com/thread/127839
SwiftUI:how to get the secondView showed in ful... |Apple Developer Forums
SwiftUI: I am trying to transfer to secondView from firstView on iPad Pro(11inch) Horizontal screen,the secondView can not be showed in full screen here is my code: import SwiftUI struct ContentView: View { @State var showsecondView: Bool = false
forums.developer.apple.com
www.youtube.com/watch?v=514A7yzznJE
⚠️ 참고 ⚠️
저는 iOS13일때 이 글을 쓴건데,
iOS 14부터 fullScreenCover(isPresented:onDismiss:content:) 를 사용하시면 됩니다!!
'🍏 > SwiftUI + Combine' 카테고리의 다른 글
[SwiftUI] 뷰의 이니셜라이저에서 @State, @Binding, @EnvironmentObject에 접근하기 (1) | 2020.08.31 |
---|---|
[SwiftUI] Multi-platform App 만들기 - 프로젝트 세팅 (2) | 2020.08.06 |
[Combine] Cancellable과 AnyCancellable (6) | 2019.06.28 |
Rx에서 Combine으로 바꿔본 후기와 느낀점 (2) | 2019.06.28 |
RxSwift vs Combine - 스펙 / 성능 / 개념 비교 (16) | 2019.06.28 |
- Total
- Today
- Yesterday
- Flutter Text Gradient
- drf custom error
- ipad multitasking
- github actions
- Python Type Hint
- flutter deep link
- Sketch 누끼
- Django Heroku Scheduler
- 장고 URL querystring
- Flutter getter setter
- Django Firebase Cloud Messaging
- PencilKit
- Flutter Clipboard
- cocoapod
- 플러터 얼럿
- ribs
- 장고 Custom Management Command
- 플러터 싱글톤
- METAL
- flutter build mode
- Flutter 로딩
- flutter dynamic link
- Watch App for iOS App vs Watch App
- flutter 앱 출시
- SerializerMethodField
- DRF APIException
- 구글 Geocoding API
- Django FCM
- Dart Factory
- Flutter Spacer
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |