Remove all iOS 14 specific components and workarounds and comply with SwiftUI 3. Signed-off-by: kingbri <bdashore3@proton.me>
27 lines
515 B
Swift
27 lines
515 B
Swift
//
|
|
// InlineHeader.swift
|
|
// Ferrite
|
|
//
|
|
// Created by Brian Dashore on 9/5/22.
|
|
//
|
|
// For iOS 15's weird defaults regarding sectioned list padding
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct InlineHeader: View {
|
|
let title: String
|
|
|
|
init(_ title: String) {
|
|
self.title = title
|
|
}
|
|
|
|
var body: some View {
|
|
if #available(iOS 16, *) {
|
|
Text(title)
|
|
} else {
|
|
Text(title)
|
|
.listRowInsets(EdgeInsets(top: 10, leading: 15, bottom: 0, trailing: 0))
|
|
}
|
|
}
|
|
}
|