I just updated to Xcode 13 and iOS 15 and I'm experiencing weird glitch that I cannot figure out how to fix. I have a List with header. The header has fixed height of 44.0. The extra space isn't there on iOS 14.
Screenshots:
List:
var body: some View {
List {
pendingRequestsSection
visitedRequestsSection
}
.listStyle(InsetGroupedListStyle())
}
// Sections
private var pendingRequestsSection: some View {
Section(
content: {
if viewModel.pendingRowModels.isEmpty {
noRequestsRow
} else {
ForEach(viewModel.pendingRowModels, content: requestRow)
}
},
header: {
ListReloadView(
isLoading: $viewModel.isLoading,
lastFetchDate: $viewModel.recentFetchDate,
action: viewModel.reloadTapped
)
}
)
.textCase(nil)
}
...
Header:
var body: some View {
Button(
action: action,
label: { buttonContent }
)
.frame(height: 44.0)
}
// Helpers
private var buttonContent: some View {
HStack(alignment: .center) {
Spacer()
lastFetchDate.flatMap(timeLabel)
reloadLabel
Spacer()
}
}
private var reloadLabel: some View {
Text(isLoading ? "Loading..." : "Reload")
.font(.system(size: 12.0, weight: .semibold))
.foregroundColor(UIColor.accent.color)
.multilineTextAlignment(.center)
}
Any ideas? I'm really pissed with this iOS+Xcode release. So many things broke suddenly. Smh. Thanks in advance!