From 971397e0fca5cee7ee0c1fd0c5af8db6450df445 Mon Sep 17 00:00:00 2001 From: arichornlover <78001398+arichornlover@users.noreply.github.com> Date: Mon, 29 Apr 2024 20:34:12 -0500 Subject: [PATCH] Update AppIconOptionsController.m --- Sources/AppIconOptionsController.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Sources/AppIconOptionsController.m b/Sources/AppIconOptionsController.m index c9f9b88..c4805e6 100644 --- a/Sources/AppIconOptionsController.m +++ b/Sources/AppIconOptionsController.m @@ -6,7 +6,6 @@ @property (strong, nonatomic) UITableView *tableView; @property (strong, nonatomic) NSArray *appIcons; @property (assign, nonatomic) NSInteger selectedIconIndex; -@property (strong, nonatomic) UIImageView *backButton; @end @@ -25,7 +24,12 @@ self.tableView.delegate = self; [self.view addSubview:self.tableView]; - UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"Back.png" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil] style:UIBarButtonItemStylePlain target:self action:@selector(back)]; + self.backButton = [UIButton buttonWithType:UIButtonTypeCustom]; + [self.backButton setImage:[UIImage imageNamed:@"Back.png" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil] forState:UIControlStateNormal]; + [self.backButton addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside]; + [self.backButton setFrame:CGRectMake(0, 0, 24, 24)]; + UIBarButtonItem *customBackButton = [[UIBarButtonItem alloc] initWithCustomView:self.backButton]; + self.navigationItem.leftBarButtonItem = customBackButton; UIColor *buttonColor = [UIColor colorWithRed:203.0/255.0 green:22.0/255.0 blue:51.0/255.0 alpha:1.0]; UIBarButtonItem *resetButton = [[UIBarButtonItem alloc] initWithImage:[UIImage systemImageNamed:@"arrow.clockwise.circle.fill"] style:UIBarButtonItemStylePlain target:self action:@selector(resetIcon)];