IT/Swift5 [swiftui] 네비게이션 뷰에 액션추가하기 삶은달-걀 2021. 8. 13. 17:03 네비이션을 사용할 때 버튼에 action 기능이 필요할 때가 있다. 그럴 땐 네비게이션 링크에 .simultaneousGesture(TapGesture().onEnded{ ## 데이터를 전달할 함수 }) 이것만 붙여주면 된다!! 그러면 네비게이션 링크가 이동할 때, 버튼의 액션처럼 트리거가 되어 데이터를 전달할 수 있다. 참고 : https://stackoverflow.com/questions/57666620/is-it-possible-for-a-navigationlink-to-perform-an-action-in-addition-to-navigati 공유하기 게시글 관리 발사믹에그 'IT > Swift5' 카테고리의 다른 글 [swift] Errors were encountered while preparing your device for development. Please check the Devices and Simulators Window. 해결책 (0) 2021.08.13 [swiftui] print 입력하고 싶을 때!! (0) 2021.08.11 [swiftui] Thread 1: Fatal error: No ObservableObject of type 에러 (0) 2021.08.09 [swift 오류] thread 1: "CALayer position contains NaN: (0) 2021.08.09 'Cannot preview in this file -- active scheme does not build this file.' 에러 (0) 2021.07.25 'IT/Swift5' Related Articles [swift] Errors were encountered while preparing your device for development. Please check the Devices and Simulators Window. 해결책 [swiftui] print 입력하고 싶을 때!! [swiftui] Thread 1: Fatal error: No ObservableObject of type 에러 [swift 오류] thread 1: "CALayer position contains NaN: