Thanks,
The animations are not slow duration 0.75 to 1.5 but on simulations that is 15 to 1 in performance. Multiple things are happing on 1 card flipping and having things rotating on one surface. Without real hardware this is impossible. I would also like to know is looks good on multiple targets. I not sure how to trust using only one real target represents all hardware when testing. Simulation these things are completely untestable. I do know how important testing have written embedded software for aircraft for 47 years. I would expect debug to slow things down.
Post
Replies
Boosts
Views
Activity
Travis You hit the nail on the head but I never remember touching the debug menu ever. That did make the simulation very close to what I see on the real hardware. Thanks. I even see iPhone 11 sim looking like I would be happy with the performance on a real hardware one. Thanks again, I saw several checks on that menu I would never have said I ever selected.
Final solved this problem. The iPad Pro password was wrong in the Apple ID. Corrected the password and code now loads and run again.
I had to reboot and re-apply trusted developer status. This is an iPad Air about a week old. My iPad Pro 10. never took status away by just rebuilding. Is this a bug? I am also learning where the preferences are on this iPad. I have been using the iPad Pro do this for years without ever seeing this happen. I have done software for over 50 years. Is there a fix for this. My wife is now using my Pro and I want to use my new iPad air. I do not want to have to do this every day.
I actually found a rogue line I had added which caused what happened and it was not the sort. It did take some very detailed debugging to find. Sort is off the hook this time. After 50 some years of coding I can still create bugs requiring very detailed debugging. Still have a few features to get working but it runs on my iPar Air and my Mac Pro and looks good so far.
I tried to put the HStack is a List but this does not look good because the other list has a ForEach where the whole background in Dark Mode goes black but the HStack leaves the outer background its List white. Why does not ever area in dark mode black for all elements is a list here either. Dark Mode should make all background Black. Non of the Pad OS should be white.
The HStack is meant to be column headers for the list items and need the same styling This seam to be a short fall of lists in the dark mode.
Now I see with further investigation it appears the Spacer the .frame around text and maybe all spacing dded to HStacks do not conform to Dark Mode using prerview.
Since is is a document based app not all is visible ins the ContentView_Previews so I am looking at previews in the other struct files. Here is an example where the preview will not show dark mode correctly where I am trying to see preview of both dark and light previews of this struct. The dark mode is completer white with not text but the other is shown with text visible.
//
// InventoryLineView.swift
// InventoryApp
//
// Created by Jack Reigh on 12/12/20.
//
// Last Updated 4/14/21
import SwiftUI
struct InventoryLineView: View {
var inventory: [inventoryEntry]
@State private var showSheet3 = false
@State var itemIn: inventoryEntry // 6
var body: some View {
HStack {
Text("(itemIn.name)")
.lineLimit(4).padding(.horizontal)
.frame(width: 250, height: 88,alignment: .leading)
.onTapGesture{ print("Tap (itemIn)"); showSheet3 = true }.sheet(isPresented: $showSheet3) {
EditItemView(showSheet: $showSheet3, itemIn: $itemIn)} // 6
Spacer()
.frame(width: 4, height: 88, alignment: .leading).background(Color.orange)
Text("(itemIn.catagory)").lineLimit(4).padding(.horizontal)
.frame(width: 200, height: 88,alignment: .leading)
}
.frame(width: 468, height: 88, alignment: .leading)
.overlay(RoundedRectangle(cornerRadius: 8.0).stroke(Color.green, lineWidth: 5))//.padding(.horizontal, 0)
}
}
struct InventoryLineView_Previews: PreviewProvider {
static var data = InventoryModel()
static var previews: some View {
let inventory = data.setSampleInventory()
let item: inventoryEntry = data.setEntry()
InventoryLineView(inventory: inventory, itemIn: item)
InventoryLineView(inventory: inventory, itemIn: item).environment(.colorScheme , .dark)
}
}
Another example struct preview with both light and black previews. The HStack in this view is all white not allowing the which i to be a header Name and Category. It is not in the list to prevent it from scrolling with long lists to he a header always visible. It works in the full on a device but can not be seen in ContentView but at the start no document is yet loaded so I use the Struct previews to see them with actually data examples. but dark view does not display correctly for the separate struct previews.
//
// DocumemtViewer.swift
// DocumentPicker
//
// Created by Jack Reigh on 3/23/21.
//
// Last Updated 5/5/21
import SwiftUI
struct DocumentViewer: View {
var inventory: [inventoryEntry]
@State private var showSheet1 = false
@State private var showSheet2 = false
@State var itemId: UUID? = nil
var body: some View {
VStack {
HStack{
Text("Name").padding(2)
.frame(width: 250, height: 40,alignment: .top)
Spacer()
.frame(width: 4, height: 40, alignment: .top).background(Color.orange)
.padding(.horizontal, 0 )
Text("Category").padding(2)
.frame(width: 200, height: 40,alignment: .top)
}
.padding(.horizontal, 0) //7 yes
.frame(width: 468, height: 40,alignment: .leading)
.overlay(RoundedRectangle(cornerRadius: 8.0).stroke(Color.orange, lineWidth: 5)).padding(5)
List {
ForEach(inventory, id: .self.id){ item in // 6
InventoryLineView(inventory: inventory, itemIn: item).frame(alignment: .center)
.frame(width: 483, height: 88, alignment: .center)//.background(Color.orange)
} // ForEach
.environment(.defaultMinListRowHeight, 0 ) // spacing between rows in list
.environment(.defaultMinListHeaderHeight, 0 ) // spacing between rows in list
.navigationTitle("Inventory File View")
}.environment(.defaultMinListRowHeight, 88) // List End
.frame(width: 510, height: length - 180, alignment: .bottom)//5
}.frame(height: length - 118,alignment: .bottom)
// Outer Border of Inventory VStack
.overlay(RoundedRectangle(cornerRadius: 8.0).stroke(Color.blue, lineWidth: 5)).padding(5)
}
}
struct DocumentViewer_Previews: PreviewProvider {
static var data = InventoryModel()
static var previews: some View {
let sample = data.setSampleInventory()
DocumentViewer(inventory: sample)
DocumentViewer(inventory: sample).environment(.colorScheme , .dark)
}
}
I solved the problem with much better modifier as below.
DocumentViewer(inventory: sample)
.preferredColorScheme(.light)
The new swiftUI Table will make it even easer by
incorporating the headers since making them outside
the List is what caused the original problem.
This size is for the iPhone 12 Mini. That really show the problem
After many tries I finally got my iPad Air gen 4 to initialize. This always seems to take reboots of all devices involved many times. And many cleans and rebuilds. The error messages do not give much help since they are too non specific. The code does work better on my hardware so the Goode generation appears to be fine. The size used for the iPad Air was 150 so the screen was as full as possible and no problems as in the simulator were seen.
Here is one of my Simulator views. I must have mis represented the left and right since you only showing the good side of the screen.
The size here is not what it was on my edit screen before submit. If the edit screen should change the size with submit.