customLaunchView.m 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. //
  2. // customLaunchView.m
  3. // 隐私保护
  4. //
  5. // Created by xd h on 2023/10/12.
  6. //
  7. #import "customLaunchView.h"
  8. @implementation customLaunchView
  9. - (id)initWithFrame:(CGRect)frame{
  10. self = [super initWithFrame:frame];
  11. [self drawAnyView];
  12. return self;
  13. }
  14. -(void)drawAnyView
  15. {
  16. UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H)];
  17. imageView.image = [UIImage imageNamed:@"customLaunch"];
  18. [self addSubview:imageView];
  19. // UIImageView *imageView111 = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H)];
  20. //
  21. // [self addSubview:imageView111];
  22. //
  23. // //NSString *preferredLanguage = [[[NSBundle mainBundle] preferredLocalizations] firstObject];
  24. // ///获取设备当前地区的代码和APP语言环境
  25. // NSString *languageCode = [NSLocale preferredLanguages][0];
  26. //
  27. // NSString *imageNameStr = @"customLaunch_en";
  28. //
  29. // //if([languageCode isEqualToString:@"zh-Hans-US"])
  30. // if([languageCode rangeOfString:@"zh-Hans"].location != NSNotFound)
  31. // {
  32. // imageNameStr = @"customLaunch_Hans";
  33. // }
  34. // //else if([languageCode isEqualToString:@"zh-Hant-HK"])
  35. // else if([languageCode rangeOfString:@"zh-Hant"].location != NSNotFound)
  36. // {
  37. // imageNameStr = @"customLaunch_Hans_HK";
  38. // }
  39. // //else if([languageCode isEqualToString:@"ja-US"])
  40. // else if([languageCode rangeOfString:@"ja-"].location != NSNotFound)
  41. // {
  42. // imageNameStr = @"customLaunch_ja";
  43. // }
  44. //
  45. // imageView111.image = [UIImage imageNamed:imageNameStr];
  46. //
  47. // [imageView111 mas_remakeConstraints:^(MASConstraintMaker *make) {
  48. // make.centerX.mas_equalTo(0);
  49. // make.centerY.mas_equalTo(0);
  50. // make.width.mas_equalTo(375.0);
  51. // //make.height.mas_equalTo(320.0);
  52. // }];
  53. // guide_up_icon
  54. UIImageView *upImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"guide_up_icon"]];
  55. [self addSubview:upImageView];
  56. [upImageView mas_makeConstraints:^(MASConstraintMaker *make) {
  57. make.bottom.mas_equalTo(-60);
  58. make.centerX.mas_equalTo(0);
  59. make.width.mas_equalTo(100*1.3);
  60. make.height.mas_equalTo(28*1.3);
  61. }];
  62. }
  63. @end