Skip to content

Commit

Permalink
CAScreenItem
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanPodymov committed Mar 5, 2024
1 parent be2f164 commit a8aa854
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Sources/CommonAppleKit/CAScreenItem.swift
Original file line number Diff line number Diff line change
@@ -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() {

}
}
6 changes: 6 additions & 0 deletions Sources/CommonAppleKit/CommonAppleKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,12 @@
.init()
}
}

public extension CAView {
var traitCollection: CATraitCollection {
.init()
}
}
#endif

public extension CAButton {
Expand Down

0 comments on commit a8aa854

Please sign in to comment.