79657655

Date: 2025-06-08 08:33:48
Score: 0.5
Natty:
Report link

small example:

extension View {

    @ViewBuilder public func foregroundPolyfill(_ color: Color) -> some View {
        if #available(macOS 14.0, iOS 17.0, *) { self.foregroundStyle(color) }
        else                                   { self.foregroundColor(color) }
    }

}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Maxim Rysevets