[Solved] Start function not being called swftui [closed]
[ad_1] There are multiple ways. You can either call your function inside the view via a .onAppear. .onAppear { yourFunction() } Or by calling an initializer between the class/struct you have, and its var body: Some View as this: struct YourView: View { init { yourFunction() } var body: some View { //Your view code… … Read more