diff --git a/Sources/CommonAppleKit/CAScreenItem.swift b/Sources/CommonAppleKit/CAScreenItem.swift new file mode 100644 index 0000000..bc03438 --- /dev/null +++ b/Sources/CommonAppleKit/CAScreenItem.swift @@ -0,0 +1,21 @@ +// +// CAScreenItem.swift +// CommonAppleKit +// +// Created by Roman Podymov on 05/03/2024. +// Copyright © 2024 CommonAppleKit. All rights reserved. +// + +open class CAScreenItem: CAView { + #if canImport(UIKit) + open override func traitCollectionDidChange(_ previousTraitCollection: CATraitCollection?) { + super.traitCollectionDidChange(previousTraitCollection) + + didChangeTraitCollection() + } + #endif + + open func didChangeTraitCollection() { + + } +} diff --git a/Sources/CommonAppleKit/CommonAppleKit.swift b/Sources/CommonAppleKit/CommonAppleKit.swift index fb3ad18..99cd072 100644 --- a/Sources/CommonAppleKit/CommonAppleKit.swift +++ b/Sources/CommonAppleKit/CommonAppleKit.swift @@ -238,6 +238,12 @@ .init() } } + + public extension CAView { + var traitCollection: CATraitCollection { + .init() + } + } #endif public extension CAButton {