How to fix a Form Picker or a NavigationLink that isn’t tappable
Dev Study/SwiftUI 2019. 12. 6. 14:58반응형
Hacking with Swift 사이트의 강좌 번역본입니다.
How to fix a Form Picker or a NavigationLink that isn’t tappable
NavigationLink 또는 Picker가 동작하지 않는 경우에, 이것은 보통 SwiftUI가 NavigationView 안쪽에 뷰를 포함할것이라 예상하기 때문에 발생합니다 - disclosure indicator를 보여주는 목록 행을 볼 수 있지만, 사용불가능한 것을 나타내기 위함입니다.
이 문제를 고치기 위해, 다음과 같이 뷰를 NavigationView로 감쌉니다.
NavigationView {
NavigationLink(destination: Text("Detail view")) {
Text("Show detail view")
}
}
반응형
'Dev Study > SwiftUI' 카테고리의 다른 글
| SwiftUI + UIKit (0) | 2023.05.10 |
|---|---|
| Using TimelineView and Canvas in SwiftUI (0) | 2022.01.27 |
| Understanding Data Flow in SwiftUI (0) | 2021.01.05 |
| How to Create a Neumorphic Design With SwiftUI (1) | 2020.06.01 |
| How to fix images not resizing (0) | 2019.12.06 |
| How to fix “Missing argument for parameter ‘content’ in call” (0) | 2019.12.06 |
| How to fix “Cannot convert value of type ‘() -> ()’ to expected argument type ‘() -> _’” (0) | 2019.12.06 |
| How to fix “Referencing initializer ‘init(wrappedValue:)’ on ‘ObservedObject’ requires that ‘SomeType’ conform to ‘ObservableObject’“ (0) | 2019.12.06 |

