Got a strange message when running Simulator for my SwiftUI app project. Using TabView as my main ContentView. Within that I have one index as my ProfileView with smiple Form, Sections and TextFields.
struct ProfileView: View {
@State var firstName: String = ""
@State var lastName: String = ""
@State var department: String = ""
var body: some View {
VStack {
TitleLabel(text: "User Profile")
Form {
Section(header: Text("Name").font(.body)) {
TextField("First name:", text: $firstName)
TextField("Last name:", text: $lastName)
}
Section(header: Text("Department")) {
TextField("Department:", text: $department)
}
Section(header: Text("Photo")) {
Text("Picture will go here")
}
}
}
}
}
Note: TitleLabel is just a custom view with a font style alteration that will be used across all views in the app.
When I navigate into any view that has a Form inside of it, then navigate out of the view (back to home or any other), the debugger shows this error.
[TableView] Warning once only: UITableView was told to layout its visible cells and other contents without being in the view hierarchy (the table view or one of its superviews has not been added to a window). This may cause bugs by forcing views inside the table view to load and perform layout without accurate information
Any ideas? Nothing rocket-sciencey here...