@@ -15,35 +15,59 @@ import Player
15
15
/**
16
16
Text of the title label.
17
17
*/
18
- @IBInspectable public var title : String = " Big Buck Bunny "
18
+ @IBInspectable public var title : String = " Big Buck Bunny " {
19
+ didSet{
20
+ titleLbl. text = title
21
+ }
22
+ }
19
23
/**
20
24
Max font size of the title label.
21
25
*/
22
26
@IBInspectable public var titleSize : CGFloat = 26
23
27
/**
24
28
Text of the subtitle label.
25
29
*/
26
- @IBInspectable public var subtitle : String = " Inside the extraordinary world of Buck Bunny "
30
+ @IBInspectable public var subtitle : String = " Inside the extraordinary world of Buck Bunny " {
31
+ didSet{
32
+ subtitleLbl. text = subtitle
33
+ }
34
+ }
27
35
/**
28
36
Max font size of the subtitle label.
29
37
*/
30
38
@IBInspectable public var subtitleSize : CGFloat = 19
31
39
/**
32
40
Text of the category label.
33
41
*/
34
- @IBInspectable public var category : String = " today's movie "
42
+ @IBInspectable public var category : String = " today's movie " {
43
+ didSet{
44
+ categoryLbl. text = category. uppercased ( )
45
+ }
46
+ }
35
47
/**
36
48
Size for the play button in the player.
37
49
*/
38
- @IBInspectable public var playBtnSize : CGFloat = 56
50
+ @IBInspectable public var playBtnSize : CGFloat = 56 {
51
+ didSet {
52
+ layout ( animating: false )
53
+ }
54
+ }
39
55
/**
40
56
Image shown in the play button.
41
57
*/
42
- @IBInspectable public var playImage : UIImage ?
58
+ @IBInspectable public var playImage : UIImage ? {
59
+ didSet {
60
+ playIV. image = playImage
61
+ }
62
+ }
43
63
/**
44
64
Image shown before the player is loaded.
45
65
*/
46
- @IBInspectable public var playerCover : UIImage ?
66
+ @IBInspectable public var playerCover : UIImage ? {
67
+ didSet{
68
+ playerCoverIV. image = playerCover
69
+ }
70
+ }
47
71
/**
48
72
If the player should start the playback when is ready.
49
73
*/
@@ -56,7 +80,9 @@ import Player
56
80
Source for the video ( streaming or local ).
57
81
*/
58
82
@IBInspectable public var videoSource : URL ? {
59
- didSet { player. url = videoSource }
83
+ didSet {
84
+ player. url = videoSource
85
+ }
60
86
}
61
87
62
88
/**
0 commit comments