Skip to content

Commit db13be0

Browse files
committed
Center-align text for image HUD type
1 parent bbc0b65 commit db13be0

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Demo/WSProgressHUD/WSProgressHUD.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,7 @@ - (void)updateSubviewsPositionWithString: (NSString *)string
567567
WSProgressHUDStringRect.origin.y = imageOffset;
568568
[self startIndicatorAnimation:NO];
569569
self.labelView.center = CGPointMake(hudCenterX , hudCenterY + 20);
570+
self.labelView.textAlignment = NSTextAlignmentCenter;
570571
self.imageView.center = CGPointMake(hudCenterX, 30);
571572
} else {
572573
self.labelView.text = string;

WSProgressHUD/WSProgressHUD.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ - (void)updateSubviewsPositionWithString: (NSString *)string
566566
WSProgressHUDStringRect.origin.y = imageOffset;
567567
[self startIndicatorAnimation:NO];
568568
self.labelView.center = CGPointMake(hudCenterX , hudCenterY + 20);
569+
self.labelView.textAlignment = NSTextAlignmentCenter;
569570
self.imageView.center = CGPointMake(hudCenterX, 30);
570571
} else {
571572
self.labelView.text = string;

0 commit comments

Comments
 (0)