added iOS source code
[wl-app.git] / iOS / WolneLektury / Screens / Common / WLNavigationController.swift
diff --git a/iOS/WolneLektury/Screens/Common/WLNavigationController.swift b/iOS/WolneLektury/Screens/Common/WLNavigationController.swift
new file mode 100644 (file)
index 0000000..dd69fc8
--- /dev/null
@@ -0,0 +1,22 @@
+//
+//  WLNavigationController.swift
+//  WolneLektury
+//
+//  Created by Pawel Dabrowski on 28/09/2018.
+//  Copyright © 2018 Fundacja Nowoczesna Polska. All rights reserved.
+//
+
+import UIKit
+
+class WLNavigationController: UINavigationController {
+
+    override var shouldAutorotate: Bool {
+        return true
+    }
+    
+    override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
+        
+        return UIDevice.current.userInterfaceIdiom == .pad ? .all : .portrait
+    }
+
+}