SwiftUI init doesn't work in a view struct

前端 未结 0 521
暗喜
暗喜 2021-02-05 07:25

I have this struct in my code:

struct TabsController: View {
   @State var selectedView = 1

  init(_ selectedView: Int) {
       self.selectedView = selectedView         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题