1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2024-12-08 22:56:41 +01:00
mastodon-app-ufficiale-ipho.../MastodonSDK/Sources/MastodonUI/Extension/UIView.swift

36 lines
764 B
Swift

//
// UIView.swift
//
//
// Created by MainasuK on 2022-4-13.
//
import UIKit
import MastodonCore
extension UIView {
static let separatorColor: UIColor = {
UIColor(dynamicProvider: { collection in
switch collection.userInterfaceStyle {
case .dark:
return ThemeService.shared.currentTheme.value.separator
default:
return .separator
}
})
}()
public static var separatorLine: UIView {
let line = UIView()
line.backgroundColor = UIView.separatorColor
return line
}
public static func separatorLineHeight(of view: UIView) -> CGFloat {
return 1.0 / view.traitCollection.displayScale
}
}