You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following on from previous issue — 3.0.1 did fix the crash I reported — thank you! In the process of trying again in my larger complex project, I developed this additional View which should exhibit a crash as well.
This is not to say that this code exhibits the best practices for layout — it does not. Also, it's a squashing into a single view my complex project example with many views. But, it does crash :)
Happy to help with reporting these! HFlow et al is a very promising layout package.
//
// ContentView.swift
// SwiftUIFlowTester
//
// Created by Matthew Krom on 1/20/25.
//
import SwiftUI
import Flow
struct ContentView: View {
var body: some View {
VStack {
Text("Flow Testing")
.font(.title)
HFlow(alignment: .top) {
GroupBox {
VStack(alignment: .leading) {
Text("A")
}
}
.fixedSize()
.padding(.bottom)
.frame(alignment: .topLeading)
.padding(.horizontal)
GroupBox {
HStack {
Text("B")
}
}
.frame(
maxWidth: .infinity,
maxHeight: .infinity,
alignment: .topLeading
)
.padding(.bottom)
.padding(.horizontal)
.fixedSize(horizontal: true, vertical: false)
GroupBox {
Text("C")
Text("...")
Text("...")
Text("...")
Text("...")
Text("...")
}
/* The reason we have multiple frame/fixedSize here is that in the real
project, there are subviews (container views) which provide these
.frame modifiers — we don't have them all in one place, if you see what I mean. */
.frame(
maxWidth: .infinity,
maxHeight: .infinity,
alignment: .topLeading
)
.padding(.bottom)
.padding(.horizontal)
.fixedSize(horizontal: true, vertical: false)
}
}
.frame(maxWidth: .infinity)
}
}
#Preview {
ContentView()
}
The text was updated successfully, but these errors were encountered:
I should add that this crash appears different from the previous one — instead of the stack trace pointing to your package, it points to @main . But, replacing HFlow with HStack "fixes" the issue, so it seems the issue may be introduced by HFlow
matthewkrom
changed the title
Crash on contrived example (simplified from larger complex project crash)
Crash on example (simplified from larger complex project crash)
Jan 23, 2025
Following on from previous issue — 3.0.1 did fix the crash I reported — thank you! In the process of trying again in my larger complex project, I developed this additional View which should exhibit a crash as well.
This is not to say that this code exhibits the best practices for layout — it does not. Also, it's a squashing into a single view my complex project example with many views. But, it does crash :)
Happy to help with reporting these! HFlow et al is a very promising layout package.
The text was updated successfully, but these errors were encountered: