Sometimes I any need to adjust the swiftUI component, so I dive into UIKit and adjust what I need, for example in the code below I adjust the table view appearance for a specific view, the problem is that effect to all the SwiftUI views the have table view so everything became a big mess, did there is some way to adjust the SwiftUI component for specific view without effect the same component in the other's views.
struct New_EditGroup: View {
init() {
let tableAppearance = UITableView.appearance()
tableAppearance.contentInset = UIEdgeInsets(top: 16, left: 0, bottom: 0, right: 0)
tableAppearance.sectionHeaderHeight = 1
tableAppearance.sectionFooterHeight = 16
}
var body: some View {
// ...
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…