Swiftui Form View jump up bug

前端 未结 2 1265
不知归路
不知归路 2021-01-17 19:47

I had a problem when following Raywenderlich Tutorial. The form view will automatically jump upward a little bit every time i clicked an item. Is this a bug

2条回答
  •  攒了一身酷
    2021-01-17 20:34

    Workaround

    By my findings it looks like Form layout issue, thus as a temporary solution the following workaround someone might find applicable:

    Form {
        TextField("Name", text:$task.name)
        Toggle("Completed", isOn: $task.completed)
    }
    .navigationBarTitle("", displayMode: .inline) // !!!
    

提交回复
热议问题