1//
2//  EXSplashScreenHUDButton.m
3//  EXSplashScreen
4//
5
6#import "EXSplashScreenHUDButton.h"
7
8@implementation EXSplashScreenHUDButton
9
10-(void)layoutSubviews
11{
12  if (@available(iOS 13.0, *)) {
13    UIImageView *infoIcon = [UIImageView new];
14    UIImageSymbolConfiguration *symbolConfig = [UIImageSymbolConfiguration configurationWithFont:[UIFont boldSystemFontOfSize:24.f]];
15    UIImage *infoImage = [UIImage systemImageNamed: @"info.circle" withConfiguration:symbolConfig];
16    [infoIcon setImage:infoImage];
17    infoIcon.frame = CGRectMake(24.f, 0, 24.f, 24.f);
18    [self addSubview:infoIcon];
19  }
20
21  NSString *title = @"Stuck on splash screen?";
22  [self setTitle: title forState:UIControlStateNormal];
23  self.titleLabel.font = [UIFont boldSystemFontOfSize:16.0f];
24  self.titleEdgeInsets = UIEdgeInsetsMake(0, 24.0f, 0, 0);
25
26  [super layoutSubviews];
27}
28
29-(CGSize)intrinsicContentSize {
30  return CGSizeMake(300, 24.f);
31}
32
33@end
34