Procházet zdrojové kódy

use translucent qr-code title bar

the old, totally transparent title bar led to more or less
unreadable tabs, depending on what is shown to the camera.

after figuring out the translucent thingie at #1843,
this is a nice improvement for the other view using a tabbar in the title.

moreover, this pr adds an animation for both tabs,
things really seem to be fast enough,
also, the system seem to do UIViewController creation in parallel anyways.
B. Petersen před 2 roky
rodič
revize
d14d834612
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. 5 1
      deltachat-ios/Controller/QrPageController.swift

+ 5 - 1
deltachat-ios/Controller/QrPageController.swift

@@ -74,6 +74,10 @@ class QrPageController: UIPageViewController {
             animated: true,
             completion: nil
         )
+
+        if #available(iOS 13, *) {
+            self.navigationController?.navigationBar.scrollEdgeAppearance = self.navigationController?.navigationBar.standardAppearance
+        }
     }
 
     override func viewWillAppear(_ animated: Bool) {
@@ -101,7 +105,7 @@ class QrPageController: UIPageViewController {
         } else {
             let qrCodeReaderController = makeQRReader()
             self.qrCodeReaderController = qrCodeReaderController
-            setViewControllers([qrCodeReaderController], direction: .forward, animated: false, completion: nil)
+            setViewControllers([qrCodeReaderController], direction: .forward, animated: true, completion: nil)
         }
     }