diff --git a/iphone/Maps/Bookmarks/Catalog/BookmarksLoadedViewController.xib b/iphone/Maps/Bookmarks/Catalog/BookmarksLoadedViewController.xib
index a666f914f1..7d1e9fa163 100644
--- a/iphone/Maps/Bookmarks/Catalog/BookmarksLoadedViewController.xib
+++ b/iphone/Maps/Bookmarks/Catalog/BookmarksLoadedViewController.xib
@@ -28,7 +28,7 @@ succesfully downloaded
-
+
@@ -41,7 +41,7 @@ new places from the list
-
+
@@ -51,6 +51,7 @@ new places from the list
+
@@ -72,6 +73,7 @@ new places from the list
+
diff --git a/iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift b/iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift
index d8d35c6744..a723be49a0 100644
--- a/iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift
+++ b/iphone/Maps/Bookmarks/Catalog/CatalogWebViewController.swift
@@ -9,6 +9,7 @@ final class CatalogWebViewController: WebViewController {
var statSent = false
var backButton: UIBarButtonItem!
var fwdButton: UIBarButtonItem!
+ var toolbar = UIToolbar()
@objc init() {
super.init(url: MWMBookmarksManager.catalogFrontendUrl()!, title: L("guides"))!
@@ -55,14 +56,22 @@ final class CatalogWebViewController: WebViewController {
progressImageView.centerYAnchor.constraint(equalTo: progressView.centerYAnchor).isActive = true
progressView.widthAnchor.constraint(equalToConstant: 48).isActive = true
progressView.heightAnchor.constraint(equalToConstant: 48).isActive = true
+
+ view.addSubview(toolbar)
+ toolbar.translatesAutoresizingMaskIntoConstraints = false
+ toolbar.leftAnchor.constraint(equalTo: view.leftAnchor).isActive = true
+ toolbar.rightAnchor.constraint(equalTo: view.rightAnchor).isActive = true
+ toolbar.topAnchor.constraint(equalTo: progressView.bottomAnchor, constant: 8).isActive = true
+
if #available(iOS 11, *) {
+ toolbar.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor).isActive = true
progressView.leftAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leftAnchor, constant: 8).isActive = true
- progressView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -8).isActive = true
} else {
+ toolbar.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true
progressView.leftAnchor.constraint(equalTo: view.leftAnchor, constant: 8).isActive = true
- progressView.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: -8).isActive = true
}
+
rotateProgress()
updateProgress()
navigationItem.leftBarButtonItem = UIBarButtonItem(image: #imageLiteral(resourceName: "ic_catalog_close"), style: .plain, target: self, action: #selector(goBack))
@@ -72,8 +81,7 @@ final class CatalogWebViewController: WebViewController {
super.viewWillAppear(animated)
let fixedSpace = UIBarButtonItem(barButtonSystemItem: .fixedSpace, target: nil, action: nil)
fixedSpace.width = 20
- self.setToolbarItems([backButton, fixedSpace, fwdButton], animated: true)
- self.navigationController?.setToolbarHidden(false, animated: animated)
+ toolbar.setItems([backButton, fixedSpace, fwdButton], animated: true)
}
override func viewDidAppear(_ animated: Bool) {
@@ -83,11 +91,6 @@ final class CatalogWebViewController: WebViewController {
}
}
- override func viewWillDisappear(_ animated: Bool) {
- super.viewWillDisappear(animated)
- self.navigationController?.setToolbarHidden(true, animated: animated)
- }
-
override func webView(_ webView: WKWebView,
decidePolicyFor navigationAction: WKNavigationAction,
decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
diff --git a/iphone/Maps/Bookmarks/Catalog/DownloadedBookmarksViewController.swift b/iphone/Maps/Bookmarks/Catalog/DownloadedBookmarksViewController.swift
index f33d0024cb..58a3872f8b 100644
--- a/iphone/Maps/Bookmarks/Catalog/DownloadedBookmarksViewController.swift
+++ b/iphone/Maps/Bookmarks/Catalog/DownloadedBookmarksViewController.swift
@@ -47,6 +47,7 @@ class DownloadedBookmarksViewController: MWMViewController {
verticalFittingPriority: .defaultLow)
f.size = s
bottomView.frame = f
+ tableView.refresh()
}
@IBAction func onDownloadBookmarks(_ sender: Any) {
diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm
index bc0cabffe8..5dd8b6443b 100644
--- a/iphone/Maps/Classes/MapViewController.mm
+++ b/iphone/Maps/Classes/MapViewController.mm
@@ -434,9 +434,9 @@ BOOL gIsFirstMyPositionMode = YES;
GetFramework().ShowBookmarkCategory(categoryId);
};
alert.onCancelBlock = ^{
- [self dismissViewControllerAnimated:YES completion:nil];
+ [self.navigationController dismissViewControllerAnimated:YES completion:nil];
};
- [self presentViewController:alert animated:YES completion:nil];
+ [self.navigationController presentViewController:alert animated:YES completion:nil];
return;
}
}