我正在尝试覆盖的功能,edgesIgnoringSafeArea(_:)
因为我在视图中对垂直安全区域进行了自定义处理。但是,没有超级可以调用,所以我不确定除了处理每个安全区域边缘之外如何进行。任何意见,将不胜感激。
// Will use later for custom handling of vertical safe area
@State private var edgesThatIgnoreSafeArea: Edge.Set = []
func edgesIgnoringSafeArea(_ edges: Edge.Set) -> some View {
edgesThatIgnoreSafeArea = edges
// There is no super here to call, and calling self would just call this function again
return AnyView(edgesIgnoringSafeArea(edges.subtracting(.vertical)))
}