File tree Expand file tree Collapse file tree 3 files changed +7
-16
lines changed
Expand file tree Collapse file tree 3 files changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -1043,13 +1043,8 @@ - (instancetype)initWithFrame:(CGRect)frame
10431043 UIImage *successImage = [UIImage imageWithContentsOfFile: [imageBundle pathForResource: @" success@2x" ofType: @" png" ]];
10441044 UIImage *failurImage = [UIImage imageWithContentsOfFile: [imageBundle pathForResource: @" error@2x" ofType: @" png" ]];
10451045
1046- if ([[UIImage class ] instancesRespondToSelector: @selector (imageWithRenderingMode: )]) {
1047- WSProgressHUDSuccessImage = [successImage imageWithRenderingMode: UIImageRenderingModeAlwaysTemplate];
1048- WSProgressHUDErrorImage = [failurImage imageWithRenderingMode: UIImageRenderingModeAlwaysTemplate];
1049- } else {
1050- WSProgressHUDErrorImage = failurImage;
1051- WSProgressHUDSuccessImage = successImage;
1052- }
1046+ WSProgressHUDSuccessImage = [self image: successImage withTintColor: WSProgressHUDForeGroundColor];
1047+ WSProgressHUDErrorImage = [self image: failurImage withTintColor: WSProgressHUDForeGroundColor];
10531048
10541049 [self addSubview: self .hudView];
10551050
@@ -1104,7 +1099,7 @@ - (UILabel *)labelView
11041099 }
11051100 _labelView.adjustsFontSizeToFitWidth = YES ;
11061101 _labelView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
1107- _labelView.textAlignment = NSTextAlignmentLeft ;
1102+ _labelView.textAlignment = NSTextAlignmentCenter ;
11081103 _labelView.numberOfLines = 0 ;
11091104 }
11101105 return _labelView;
Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ To Download the project. Run the WSProgressHUD.xcodeproj in the demo directory.
8181```
8282## Installation
8383
84+
8485WSProgressHUD is available through [CocoaPods](http://cocoapods.org). To install
8586it, simply add the following line to your Podfile:
8687
Original file line number Diff line number Diff line change @@ -1043,13 +1043,8 @@ - (instancetype)initWithFrame:(CGRect)frame
10431043 UIImage *successImage = [UIImage imageWithContentsOfFile: [imageBundle pathForResource: @" success@2x" ofType: @" png" ]];
10441044 UIImage *failurImage = [UIImage imageWithContentsOfFile: [imageBundle pathForResource: @" error@2x" ofType: @" png" ]];
10451045
1046- if ([[UIImage class ] instancesRespondToSelector: @selector (imageWithRenderingMode: )]) {
1047- WSProgressHUDSuccessImage = [successImage imageWithRenderingMode: UIImageRenderingModeAlwaysTemplate];
1048- WSProgressHUDErrorImage = [failurImage imageWithRenderingMode: UIImageRenderingModeAlwaysTemplate];
1049- } else {
1050- WSProgressHUDErrorImage = failurImage;
1051- WSProgressHUDSuccessImage = successImage;
1052- }
1046+ WSProgressHUDSuccessImage = [self image: successImage withTintColor: WSProgressHUDForeGroundColor];
1047+ WSProgressHUDErrorImage = [self image: failurImage withTintColor: WSProgressHUDForeGroundColor];
10531048
10541049 [self addSubview: self .hudView];
10551050
@@ -1104,7 +1099,7 @@ - (UILabel *)labelView
11041099 }
11051100 _labelView.adjustsFontSizeToFitWidth = YES ;
11061101 _labelView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
1107- _labelView.textAlignment = NSTextAlignmentLeft ;
1102+ _labelView.textAlignment = NSTextAlignmentCenter ;
11081103 _labelView.numberOfLines = 0 ;
11091104 }
11101105 return _labelView;
You can’t perform that action at this time.
0 commit comments