반응형
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
- nestjs
- swift6
- URL(string:)
- @Binding
- @EnvironmentObject
- RxCocoa
- init?
- @State
- Operater
- init
- SWIFT
- @Environment
- ios14
- graphql
- RxSwift
- typeorm
- Xcode
- IOS
- NavigationLink
- NullObject
- Bug
- RFC1738/1808
- Operators
- vim
- operator
- dismiss
- nonisolated
- subject
- SwiftUI
- Creating Operators
Archives
- Today
- Total
목록NavigationLink (2)
Tunko Development Diary

NavigationLink 를 통해 다른 뷰로 이동시 기본적으로 해당 뷰를 버튼 처럼 터치할 수 있게 됩니다. 이때 에니메이션이 동작하지 않도록 하는 방법입니다. import SwiftUI struct EmpeyActionStyle: ButtonStyle { func makeBody(configuration: Configuration) -> some View { configuration.label } } 사용시 NavigationLink { Text("Next View") } label: { Text("Button") } .buttonStyle(EmpeyActionStyle())
Development/iOS 개발
2022. 9. 6. 22:18

iOS 버전에 따라 구현 방법이 달라집니다. iOS13, 14 @Environment(\.presentationMode) var presentationMode 라는 환경변수를 통해서 presentationMode.wrappedValue.dismiss() 를 사용해야 했습니다. iOS15 @Environment(\.dismiss) private var dismiss 해당 환경변수를 선언후 dismiss() 형태로 사용할 수 있습니다. 실제로 사용할 때 다른 파일로 NavigationBackItem View를 생성하고 import SwiftUI struct NavigationBackItem: View { @Environment(\.dismiss) private var dismiss var title : St..
Development/iOS 개발
2022. 7. 21. 18:42