Enabling the loading overlay info text to take attributed string.

This commit is contained in:
Sumanth Nadigadda 2023-10-19 16:58:07 +05:30
parent 0a42ebb032
commit fdaa932c3b

View File

@ -42,7 +42,7 @@
self.activityIndicator.accessibilityIdentifier = @"Loader"; self.activityIndicator.accessibilityIdentifier = @"Loader";
[activityIndicatorView pinWidthAndHeight]; [activityIndicatorView pinWidthAndHeight];
Label *infoLabel = [Label commonLabelH3:YES]; Label *infoLabel = [Label label];
infoLabel.textAlignment = NSTextAlignmentCenter; infoLabel.textAlignment = NSTextAlignmentCenter;
infoLabel.translatesAutoresizingMaskIntoConstraints = NO; infoLabel.translatesAutoresizingMaskIntoConstraints = NO;
self.indicatorText = infoLabel; self.indicatorText = infoLabel;
@ -80,12 +80,12 @@
[self.activityIndicator resumeSpinner]; [self.activityIndicator resumeSpinner];
} }
- (void)startLoadingWith:(nullable NSString *) text{ - (void)startLoadingWith:(nullable NSAttributedString *) text{
if(text != nil){ if(text != nil){
self.indicatorText.text = text; self.indicatorText.attributedText = text;
self.indicatorText.accessibilityLabel = text; self.indicatorText.accessibilityLabel = text.string;
} else { } else {
self.indicatorText.text = @""; self.indicatorText.attributedText = nil;
self.indicatorText.accessibilityLabel = @""; self.indicatorText.accessibilityLabel = @"";
} }
[self.activityIndicator resumeSpinner]; [self.activityIndicator resumeSpinner];