File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed
Example Apps/SparrowKit.xcodeproj/project.xcworkspace/xcuserdata/ivanvorobei.xcuserdatad
Sources/SparrowKit/UIKit/Classes/Table Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -66,20 +66,27 @@ open class SPTableViewCell: UITableViewCell {
6666
6767 No need ovveride other init. Using one function for configurate view.
6868 */
69- open func commonInit( ) {
70- if #available( iOS 13 . 0 , * ) {
71- selectedBackgroundView = UIView ( )
72- #if os(iOS)
73- selectedColor = UIColor . systemGray5
74- #endif
75- }
76- }
69+ open func commonInit( ) { }
7770
7871 // MARK: - Lifecycle
7972
8073 open override func prepareForReuse( ) {
8174 super. prepareForReuse ( )
8275 currentIndexPath = nil
8376 }
77+
78+ open override func tintColorDidChange( ) {
79+ super. tintColorDidChange ( )
80+ if #available( iOS 13 . 0 , * ) {
81+ #if os(iOS)
82+ selectedColor = UIColor . init (
83+ // For light always good .systemGray5
84+ light: . systemGray5,
85+ // For dark some cases may have same color like background.
86+ dark: backgroundColor? . mixWithColor ( . white, amount: 0.06 ) ?? . systemGray4
87+ )
88+ #endif
89+ }
90+ }
8491}
8592#endif
You can’t perform that action at this time.
0 commit comments