Commit 30004d7d by Daniel Dahan

added performance updates

parent b864a98b
......@@ -39,7 +39,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let bottomNavigationController: BottomNavigationController = BottomNavigationController()
bottomNavigationController.viewControllers = [AppNavigationController(rootViewController: RecipesViewController()), VideoViewController(), PhotoViewController()]
bottomNavigationController.viewControllers = [AppMenuViewController(mainViewController: AppNavigationController(rootViewController: RecipesViewController())), VideoViewController(), PhotoViewController()]
bottomNavigationController.selectedIndex = 0
bottomNavigationController.tabBar.tintColor = MaterialColor.lightBlue.base
bottomNavigationController.tabBar.backgroundColor = MaterialColor.grey.darken4
......
......@@ -34,6 +34,8 @@
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
......
......@@ -100,11 +100,6 @@ public class BottomNavigationController : UITabBarController, UITabBarController
}
}
}
if let v: Array<UIViewController> = viewControllers {
for controller in v {
controller.edgesForExtendedLayout = .None
}
}
}
/**
......@@ -115,6 +110,7 @@ public class BottomNavigationController : UITabBarController, UITabBarController
when subclassing.
*/
public func prepareView() {
view.clipsToBounds = true
delegate = self
tabBar.depth = .Depth1
tabBar.backgroundColor = MaterialColor.white
......@@ -122,6 +118,7 @@ public class BottomNavigationController : UITabBarController, UITabBarController
tabBar.backgroundImage = UIImage()
}
/// Handles transitions when tabBarItems are pressed.
public func tabBarController(tabBarController: UITabBarController, animationControllerForTransitionFromViewController fromVC: UIViewController, toViewController toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {
return .Fade == transitionAnimation ? BottomNavigationFadeAnimatedTransitioning() : nil
}
......
......@@ -153,6 +153,8 @@ public class MenuViewController : UIViewController {
/// A method that generally prepares the MenuViewController.
private func prepareView() {
edgesForExtendedLayout = .None
view.clipsToBounds = true
prepareMenuView()
prepareMainViewController()
}
......
......@@ -60,6 +60,8 @@ public class NavigationController : UINavigationController, UIGestureRecognizerD
public override func viewDidLoad() {
super.viewDidLoad()
edgesForExtendedLayout = .None
view.clipsToBounds = true
// This ensures the panning gesture is available when going back between views.
if let v: UIGestureRecognizer = interactivePopGestureRecognizer {
......
......@@ -723,6 +723,7 @@ public class SideNavigationController : UIViewController, UIGestureRecognizerDel
/// A method that generally prepares the SideNavigationController.
private func prepareView() {
edgesForExtendedLayout = .None
prepareMainViewController()
prepareLeftView()
prepareRightView()
......@@ -733,6 +734,7 @@ public class SideNavigationController : UIViewController, UIGestureRecognizerDel
/// A method that prepares the mainViewController.
private func prepareMainViewController() {
mainViewController.view.clipsToBounds = true
prepareViewControllerWithinContainer(mainViewController, container: view)
}
......
......@@ -114,6 +114,8 @@ public class StatusBarViewController : UIViewController {
when subclassing.
*/
public func prepareView() {
edgesForExtendedLayout = .None
view.clipsToBounds = true
prepareMainViewController()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment