Update AppIconOptionsController (Added Close Button)

This is now UITableView so it’s now necessary in order to close the menu.
This commit is contained in:
arichornlover 2024-04-13 20:17:15 -05:00 committed by GitHub
parent f2a407ab5b
commit 1261286913
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,7 +20,10 @@
self.tableView.dataSource = self;
self.tableView.delegate = self;
[self.view addSubview:self.tableView];
UIBarButtonItem *closeButton = [[UIBarButtonItem alloc] initWithTitle:@"Close" style:UIBarButtonItemStylePlain target:self action:@selector(close)];
self.navigationItem.leftBarButtonItem = closeButton;
UIButton *defaultButton = [UIButton buttonWithType:UIButtonTypeSystem];
defaultButton.frame = CGRectMake(20, 100, 100, 40);
[defaultButton setTitle:@"Default" forState:UIControlStateNormal];
@ -110,4 +113,8 @@
});
}
- (void)close {
[self.presentingViewController dismissViewControllerAnimated:YES completion:nil];
}
@end