Create AppAsset shared class, which will replace the separate Mac and iOS AppAssets classes.

This commit is contained in:
Brent Simmons
2024-07-08 10:07:26 -07:00
parent 89a967106d
commit ba44b94220
21 changed files with 152 additions and 143 deletions

View File

@@ -25,16 +25,16 @@ enum ArticleExtractorButtonState {
switch buttonState {
case .error:
stripAnimatedSublayer()
setImage(AppAssets.articleExtractorError, for: .normal)
setImage(AppAsset.ArticleExtractor.error, for: .normal)
case .animated:
setImage(nil, for: .normal)
setNeedsLayout()
case .on:
stripAnimatedSublayer()
setImage(AppAssets.articleExtractorOn, for: .normal)
setImage(AppAsset.ArticleExtractor.on, for: .normal)
case .off:
stripAnimatedSublayer()
setImage(AppAssets.articleExtractorOff, for: .normal)
setImage(AppAsset.ArticleExtractor.off, for: .normal)
}
}
}
@@ -77,7 +77,7 @@ enum ArticleExtractorButtonState {
let images = [image1, image2, image1]
animatedLayer = CALayer()
let imageSize = AppAssets.articleExtractorOff.size
let imageSize = AppAsset.ArticleExtractor.off.size
animatedLayer!.bounds = CGRect(x: 0, y: 0, width: imageSize.width, height: imageSize.height)
animatedLayer!.position = CGPoint(x: bounds.midX, y: bounds.midY)