cuốn sách gpt4 ai đã làm

ios - 当我在 SwiftUI 中按下导航后退按钮时,可以添加一些操作吗?

In lại Tác giả: Walker 123 更新时间:2023-11-29 05:08:36 25 4
mua khóa gpt4 Nike

我正在开发我的第一个 iOS 应用程序。

我使用的是 Xcode 11.3 和 Swift5

我不确定是否可行,当我在 NavigationLink 中按后退按钮时可以添加操作吗?

(In this picture, the back button is 'Bibles' button.)

NavigationLink(destination: VerseList(bible: self.bible, chapter: c.chapter)){
ChapterRow(chapter: c.chapter)
}.navigationBarTitle("Chapters")

这是我的代码。我想添加“ Action ”..

Có cách nào tốt hơn?

câu trả lời hay nhất

我认为更有可能是这样。

NavigationLink(destination:VerseList(bible: self.bible, chapter: c.chapter)
.onDisappear {
// put action here
}
){ChapterRow(chapter: c.chapter)}
.navigationBarTitle("Chapters")

关于ios - 当我在 SwiftUI 中按下导航后退按钮时,可以添加一些操作吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59912470/

25 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress