@@ -25,6 +25,8 @@ public struct EZLoadingActivity {
25
25
public static var FailText = " Failure "
26
26
public static var SuccessColor = UIColor ( red: 68 / 255 , green: 118 / 255 , blue: 4 / 255 , alpha: 1.0 )
27
27
public static var FailColor = UIColor ( red: 255 / 255 , green: 75 / 255 , blue: 56 / 255 , alpha: 1.0 )
28
+ public static var ActivityWidth = UIScreen . ScreenWidth / Settings. WidthDivision
29
+ public static var ActivityHeight = ActivityWidth / 3
28
30
public static var WidthDivision : CGFloat {
29
31
get {
30
32
if UIDevice . currentDevice ( ) . userInterfaceIdiom == UIUserInterfaceIdiom . Pad {
@@ -102,9 +104,7 @@ public struct EZLoadingActivity {
102
104
var UIDisabled = false
103
105
104
106
convenience init ( text: String , disableUI: Bool ) {
105
- let width = UIScreen . ScreenWidth / Settings. WidthDivision
106
- let height = width / 3
107
- self . init ( frame: CGRect ( x: 0 , y: 0 , width: width, height: height) )
107
+ self . init ( frame: CGRect ( x: 0 , y: 0 , width: Settings . ActivityWidth, height: Settings . ActivityHeight) )
108
108
center = CGPoint ( x: UIScreen . mainScreen ( ) . bounds. midX, y: UIScreen . mainScreen ( ) . bounds. midY)
109
109
autoresizingMask = [ . FlexibleTopMargin, . FlexibleLeftMargin, . FlexibleBottomMargin, . FlexibleRightMargin]
110
110
backgroundColor = Settings . BackgroundColor
@@ -119,7 +119,7 @@ public struct EZLoadingActivity {
119
119
activityView. color = Settings . ActivityColor
120
120
activityView. startAnimating ( )
121
121
122
- textLabel = UILabel ( frame: CGRect ( x: 60 , y: yPosition, width: width - 70 , height: 40 ) )
122
+ textLabel = UILabel ( frame: CGRect ( x: 60 , y: yPosition, width: Settings . ActivityWidth - 70 , height: 40 ) )
123
123
textLabel. textColor = Settings . TextColor
124
124
textLabel. font = UIFont ( name: Settings . FontName, size: 30 )
125
125
textLabel. adjustsFontSizeToFitWidth = true
0 commit comments