@@ -35,29 +35,21 @@ - (void)viewDidLoad {
3535 [button addTarget: self action: @selector (buttonEvent ) forControlEvents: UIControlEventTouchUpInside];
3636
3737 UIButton *button1 = [UIButton buttonWithType: UIButtonTypeSystem];
38- [button1 setTitle: @" 修复异常 " forState: UIControlStateNormal];
38+ [button1 setTitle: @" 恢复如初 " forState: UIControlStateNormal];
3939 [button1 setTitleColor: UIColor.whiteColor forState: UIControlStateNormal];
4040 button1.backgroundColor = [UIColor colorWithRed: 14.0 / 255.0 green: 144.0 / 255.0 blue: 1.0 alpha: 1.0 ];
4141 [self .view addSubview: button1];
4242 button1.frame = CGRectMake ((screenWidth - 220 ) / 2.0 , CGRectGetMaxY (button.frame ) + 40.0 , 220 , 80 );
4343 [button1 addTarget: self action: @selector (button1Event ) forControlEvents: UIControlEventTouchUpInside];
4444
4545 UIButton *button2 = [UIButton buttonWithType: UIButtonTypeSystem];
46- [button2 setTitle: @" 恢复如初 " forState: UIControlStateNormal];
46+ [button2 setTitle: @" 恢复指定启动图 " forState: UIControlStateNormal];
4747 [button2 setTitleColor: UIColor.whiteColor forState: UIControlStateNormal];
4848 button2.backgroundColor = [UIColor colorWithRed: 14.0 / 255.0 green: 144.0 / 255.0 blue: 1.0 alpha: 1.0 ];
4949 [self .view addSubview: button2];
5050 button2.frame = CGRectMake ((screenWidth - 220 ) / 2.0 , CGRectGetMaxY (button1.frame ) + 40.0 , 220 , 80 );
5151 [button2 addTarget: self action: @selector (button2Event ) forControlEvents: UIControlEventTouchUpInside];
5252
53- UIButton *button3 = [UIButton buttonWithType: UIButtonTypeSystem];
54- [button3 setTitle: @" 恢复指定启动图" forState: UIControlStateNormal];
55- [button3 setTitleColor: UIColor.whiteColor forState: UIControlStateNormal];
56- button3.backgroundColor = [UIColor colorWithRed: 14.0 / 255.0 green: 144.0 / 255.0 blue: 1.0 alpha: 1.0 ];
57- [self .view addSubview: button3];
58- button3.frame = CGRectMake ((screenWidth - 220 ) / 2.0 , CGRectGetMaxY (button2.frame ) + 40.0 , 220 , 80 );
59- [button3 addTarget: self action: @selector (button3Event ) forControlEvents: UIControlEventTouchUpInside];
60-
6153 UILabel *alertLabel = [[UILabel alloc ] initWithFrame: CGRectMake (0 , 0 , 200 , 50 )];
6254 self.alertLabel = alertLabel;
6355 alertLabel.center = self.view .center ;
@@ -78,18 +70,12 @@ - (void)buttonEvent {
7870}
7971
8072- (void )button1Event {
81- [LLDynamicLaunchScreen repairException ];
82-
83- [self showAlertView: @" 修复启动图异常,APP即将退出" ];
84- }
85-
86- - (void )button2Event {
8773 [LLDynamicLaunchScreen restoreAsBefore ];
8874
8975 [self showAlertView: @" 启动图已恢复,APP即将退出" ];
9076}
9177
92- - (void )button3Event {
78+ - (void )button2Event {
9379 UIAlertController *alert = [UIAlertController alertControllerWithTitle: @" 请选择替换方式" message: nil preferredStyle: UIAlertControllerStyleActionSheet];
9480 UIAlertAction *action1 = [UIAlertAction actionWithTitle: @" 恢复浅色竖屏启动图" style: UIAlertActionStyleDefault handler: ^(UIAlertAction * _Nonnull action) {
9581 [LLDynamicLaunchScreen replaceLaunchImage: nil launchImageType: LLLaunchImageTypeVerticalLight compressionQuality: 0.8 validation: nil ];
0 commit comments