mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 04:53:36 +00:00
[ios] Fix some navigation bar buttons for iOS 26
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
committed by
Yannik Bloscheck
parent
d541cfbf02
commit
2b430c625a
@@ -17,11 +17,7 @@ static CGFloat const kButtonExtraWidth = 16.0;
|
||||
|
||||
- (UIBarButtonItem *)buttonWithImage:(UIImage *)image action:(SEL)action
|
||||
{
|
||||
UIButton * button = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, image.size.width + kButtonExtraWidth, image.size.height)];
|
||||
[button setImage:image forState:UIControlStateNormal];
|
||||
[button matchInterfaceOrientation];
|
||||
[button addTarget:self action:action forControlEvents:UIControlEventTouchUpInside];
|
||||
return [[UIBarButtonItem alloc] initWithCustomView:button];
|
||||
return [[UIBarButtonItem alloc] initWithImage:image style:UIBarButtonItemStylePlain target:self action:action];
|
||||
}
|
||||
|
||||
- (NSArray<UIBarButtonItem *> *)alignedNavBarButtonItems:(NSArray<UIBarButtonItem *> *)items
|
||||
|
||||
@@ -80,7 +80,7 @@ class DownloadMapsViewController: MWMViewController {
|
||||
tableView.registerNib(cell: MWMMapDownloaderButtonTableViewCell.self)
|
||||
title = dataSource.title
|
||||
if mode == .downloaded {
|
||||
let addMapsButton = button(with: UIImage(named: "ic_nav_bar_add"), action: #selector(onAddMaps))
|
||||
let addMapsButton = button(with: UIImage(systemName: "plus"), action: #selector(onAddMaps))
|
||||
navigationItem.rightBarButtonItem = addMapsButton
|
||||
}
|
||||
noMapsContainer.isHidden = !dataSource.isEmpty || Storage.shared().downloadInProgress()
|
||||
|
||||
Reference in New Issue
Block a user