File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,20 @@ class PageView: UIScrollView {
2222 lazy var playButton : UIButton = {
2323 let button = UIButton ( type: . custom)
2424 button. frame. size = CGSize ( width: 60 , height: 60 )
25- button. setBackgroundImage ( AssetManager . image ( " lightbox_play " ) , for: UIControl . State ( ) )
25+ var buttonImage = AssetManager . image ( " lightbox_play " )
26+
27+ // Note by Elvis Nuñez on Mon 22 Jun 08:06
28+ // When using SPM you might find that assets are note included. This is a workaround to provide default assets
29+ // under iOS 13 so using SPM can work without problems.
30+ if #available( iOS 13 . 0 , * ) {
31+ if buttonImage == nil {
32+ buttonImage = UIImage ( systemName: " play.circle.fill " )
33+ }
34+ }
35+
36+ button. setBackgroundImage ( buttonImage, for: UIControl . State ( ) )
2637 button. addTarget ( self , action: #selector( playButtonTouched ( _: ) ) , for: . touchUpInside)
38+ button. tintColor = . white
2739
2840 button. layer. shadowOffset = CGSize ( width: 1 , height: 1 )
2941 button. layer. shadowColor = UIColor . gray. cgColor
You can’t perform that action at this time.
0 commit comments