Add YT Back Icon Support (AppIconOptionsController.m)

This commit is contained in:
arichornlover 2024-04-26 20:31:56 -05:00 committed by GitHub
parent e40ace75f3
commit 7668d0be1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,13 +27,7 @@
self.tableView.backgroundColor = (self.pageStyle == UIUserInterfaceStyleLight) ? [UIColor whiteColor] : [UIColor blackColor];
[self.view addSubview:self.tableView];
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:self action:@selector(back)];
UIImage *backImage = [UIImage imageNamed:@"yt_outline_chevron_left_ios_24pt" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
if (!backImage) {
backButton.image = [UIImage systemImageNamed:@"chevron.backward"];
} else {
backButton.image = backImage;
}
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"Back.png" inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil] style:UIBarButtonItemStylePlain target:self action:@selector(back)];
[backButton setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor blackColor], NSFontAttributeName: [UIFont fontWithName:@"YTSans-Medium" size:20]} forState:UIControlStateNormal];
self.navigationItem.leftBarButtonItem = backButton;