Commit 5de32900 by Daniel Dahan

updated projects in preparation to fix NavigationBar and StatusBar issue

parent 2be8f826
......@@ -107,9 +107,7 @@ class AppBottomNavigationController: BottomNavigationController {
/// Prepares the view controllers.
private func prepareViewControllers() {
let menuController: AppMenuController = AppMenuController(rootViewController: RecipesViewController())
menuController.edgesForExtendedLayout = .None
viewControllers = [menuController, VideoViewController(), PhotoViewController()]
viewControllers = [RecipesViewController(), VideoViewController(), PhotoViewController()]
selectedIndex = 0
}
......
......@@ -43,15 +43,6 @@ class AppMenuController: MenuController {
/// MenuView inset.
private let menuViewInset: CGFloat = 16
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
override init(rootViewController: UIViewController) {
super.init(rootViewController: rootViewController)
prepareTabBarItem()
}
override func viewDidLoad() {
super.viewDidLoad()
prepareMenuView()
......@@ -159,13 +150,6 @@ class AppMenuController: MenuController {
view.layout(menuView).width(baseSize.width).height(baseSize.height).bottom(menuViewInset).right(menuViewInset)
}
/// Prepare tabBarItem.
private func prepareTabBarItem() {
tabBarItem.image = MaterialIcon.cm.photoLibrary
tabBarItem.setTitleColor(MaterialColor.grey.base, forState: .Normal)
tabBarItem.setTitleColor(MaterialColor.white, forState: .Selected)
}
}
/// MenuViewDelegate.
......
......@@ -38,6 +38,19 @@ class RecipesViewController: UIViewController {
/// A tableView used to display items.
private var tableView: UITableView!
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
}
init() {
super.init(nibName: nil, bundle: nil)
prepareTabBarItem()
}
override func viewDidLoad() {
super.viewDidLoad()
prepareView()
......@@ -48,7 +61,7 @@ class RecipesViewController: UIViewController {
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
// Stops the tableView contentInsets from being automatically adjusted.
automaticallyAdjustsScrollViewInsets = true
edgesForExtendedLayout = .None
// Enable the SideNavigation.
navigationDrawerController?.enabled = true
......@@ -171,6 +184,13 @@ class RecipesViewController: UIViewController {
// Use Layout to easily align the tableView.
view.layout(tableView).edges()
}
/// Prepare tabBarItem.
private func prepareTabBarItem() {
tabBarItem.image = MaterialIcon.cm.photoLibrary
tabBarItem.setTitleColor(MaterialColor.grey.base, forState: .Normal)
tabBarItem.setTitleColor(MaterialColor.white, forState: .Selected)
}
}
/// TableViewDataSource methods.
......
......@@ -8,8 +8,6 @@
/* Begin PBXBuildFile section */
967A48071D0E0EA300B8CEB7 /* AppRightViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 967A48061D0E0EA300B8CEB7 /* AppRightViewController.swift */; };
967A48091D0E127200B8CEB7 /* Material.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 967A48081D0E127200B8CEB7 /* Material.framework */; };
967A480A1D0E127200B8CEB7 /* Material.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 967A48081D0E127200B8CEB7 /* Material.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
96CB75011D0DFDBB0012D9F2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96CB75001D0DFDBB0012D9F2 /* AppDelegate.swift */; };
96CB75031D0DFDBB0012D9F2 /* AppLeftViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96CB75021D0DFDBB0012D9F2 /* AppLeftViewController.swift */; };
96CB75081D0DFDBB0012D9F2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96CB75071D0DFDBB0012D9F2 /* Assets.xcassets */; };
......@@ -28,7 +26,6 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
967A480A1D0E127200B8CEB7 /* Material.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
......@@ -37,7 +34,6 @@
/* Begin PBXFileReference section */
967A48061D0E0EA300B8CEB7 /* AppRightViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppRightViewController.swift; sourceTree = "<group>"; };
967A48081D0E127200B8CEB7 /* Material.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = Material.framework; path = "/Users/danieldahan/Library/Developer/Xcode/DerivedData/Material-dciwtavdzrmtrifplxfnouazaqvx/Build/Products/Debug-iphoneos/Material.framework"; sourceTree = "<absolute>"; };
96CB74FD1D0DFDBB0012D9F2 /* NavigationDrawerController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NavigationDrawerController.app; sourceTree = BUILT_PRODUCTS_DIR; };
96CB75001D0DFDBB0012D9F2 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
96CB75021D0DFDBB0012D9F2 /* AppLeftViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLeftViewController.swift; sourceTree = "<group>"; };
......@@ -56,7 +52,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
967A48091D0E127200B8CEB7 /* Material.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -66,7 +61,6 @@
96CB74F41D0DFDBB0012D9F2 = {
isa = PBXGroup;
children = (
967A48081D0E127200B8CEB7 /* Material.framework */,
96CB74FF1D0DFDBB0012D9F2 /* NavigationDrawerController */,
96CB74FE1D0DFDBB0012D9F2 /* Products */,
);
......
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