Пытаясь следовать некоторому руководству и сделал мой первый сборщик
struct ContentView: View {
@State var unitEntry = ""
@State var unitInput = ""
@State var unitOutput = 0
let units = ["Celsius", "Fahrenheit", "Kelvin"];
var body: some View {
NavigationView{
Form{
Text("Hello, World!")
TextField("Test", text: $unitEntry)
.keyboardType(.decimalPad)
Picker("Entry unit", selection: $unitInput) {
Text("Hello, World!")
Text("Hello, World2!")
}
}
}
}
}
Сборщик работает, он переходит в другой вид для выбора между двумя вариантами текста. Но когда я go вернулся и снова нажал на сборщик, он вылетел.
2020-01-19 18:32:38.593660-0500 UnitConversion[46718:2939869] [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 (e.g. table view bounds, trait collection, layout margins, safe area insets, etc), and will also cause unnecessary performance overhead due to extra layout passes. Make a symbolic breakpoint at UITableViewAlertForLayoutOutsideViewHierarchy to catch this in the debugger and see what caused this to occur, so you can avoid this action altogether if possible, or defer it until the table view has been added to a window. Table view: <_TtC7SwiftUIP33_BFB370BA5F1BADDC9D83021565761A4925UpdateCoalescingTableView: 0x7fe0e2086600; baseClass = UITableView; frame = (0 0; 414 896); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x600002677f60>; layer = <CALayer: 0x6000028af160>; contentOffset: {0, -140}; contentSize: {414, 161.00000000000003}; adjustedContentInset: {140, 0, 34, 0}; dataSource: <_TtGC7SwiftUIP13$7fff2c69da4419ListCoreCoordinatorGVS_20SystemListDataSourceOs5Never_GOS_19SelectionManagerBoxS2___: 0x7fe0bdc3e7c0>>
2020-01-19 18:32:40.477829-0500 UnitConversion[46718:2939869] Can't find keyplane that supports type 8 for keyboard iPhone-PortraitTruffle-DecimalPad; using 25739_PortraitTruffle_iPhone-Simple-Pad_Default
2020-01-19 18:32:40.504773-0500 UnitConversion[46718:2939869] Can't find keyplane that supports type 8 for keyboard iPhone-PortraitTruffle-DecimalPad; using 25739_PortraitTruffle_iPhone-Simple-Pad_Default