Post

Replies

Boosts

Views

Activity

Abnormal behavior .confirmationDialog/.alert inside lazyVstack
This is a reproducible issue, create a blank project and put a cell inside a scrollview lazyVstack, I need to have the confirmation dialog on the button or else on iPad it will crash but having the .confirmationDialog inside the lazyVstack leads to unexpected behavior. If you try to click through the cells from 1-10 the .confirmationDialog will stop working after a few taps on the cells. Not sure what the workaround is I'm trying to do something similar in my app with post cells and it's just not working well. I've also noticed that a similar thing happens with .alert if you have it inside the LazyVStack. struct ContentView: View { var body: some View { ScrollView { LazyVStack { ForEach(0..<10) { number in cell(number: number) } } } } } struct cell: View { @State private var isShowingDialog: Bool = false let number : Int var body : some View { Button { print("Tapped Cell") isShowingDialog.toggle() } label: { Text("\(number)") .frame(height: 200) .frame(maxWidth: .infinity) .border(.black) } .padding(.horizontal, 16) .confirmationDialog("Options", isPresented: $isShowingDialog, titleVisibility: .visible) { Button("Some Button", role: .destructive) { print("Did Tap Option Button") } Button("Some Other Button") { print("Did Tap Other Option Button") } } } }
0
0
151
Dec ’24
Textfield producing : Can't find or decode reasons, Failed to get or decode unavailable reasons
How to reproduce: create blank Xcode project run on physical iPhone(mine 14 pro) not simulator, updated iOS18.1.1 most up to date, on Xcode 16.1 make a text field enter any value in it in console: Can't find or decode reasons Failed to get or decode unavailable reasons This is happening in my other projects as well and I don't know a fix for it is this just an Xcode bug random log noise? It makes clicking the text field lag sometimes on initial tap.
10
14
1.2k
Nov ’24