Ferrite-backup/Ferrite/Views/CommonViews/DynamicAccentColor.swift
kingbri 530d107218 Ferrite: iOS 14 backport
Add backports to get Ferrite working on iOS 14.

Signed-off-by: kingbri <bdashore3@gmail.com>
2022-08-31 18:46:47 -04:00

22 lines
394 B
Swift

//
// dynamicAccentColor.swift
// Ferrite
//
// Created by Brian Dashore on 8/15/22.
//
import SwiftUI
struct DynamicAccentColor: ViewModifier {
let color: Color
func body(content: Content) -> some View {
if #available(iOS 15, *) {
content
.tint(color)
} else {
content
.accentColor(color)
}
}
}