Commit 91cebc7a by Daniel Dahan

updated NavigationViewController to be NavigationBarViewController

parent e4bf38c6
......@@ -96,9 +96,9 @@
</Group>
<Group
location = "container:"
name = "NavigationViewController">
name = "NavigationBarViewController">
<FileRef
location = "group:Programmatic/NavigationViewController/NavigationViewController.xcodeproj">
location = "group:Programmatic/NavigationBarViewController/NavigationBarViewController.xcodeproj">
</FileRef>
</Group>
<Group
......
......@@ -7,23 +7,23 @@
objects = {
/* Begin PBXBuildFile section */
96A71F991C76469700C0C4AE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71F981C76469700C0C4AE /* AppDelegate.swift */; };
96A71F9B1C76469700C0C4AE /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71F9A1C76469700C0C4AE /* MainViewController.swift */; };
96A71FA01C76469700C0C4AE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96A71F9F1C76469700C0C4AE /* Assets.xcassets */; };
96A71FA31C76469700C0C4AE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 96A71FA11C76469700C0C4AE /* LaunchScreen.storyboard */; };
96A71FAB1C7646EC00C0C4AE /* Material.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96A71FAA1C7646EC00C0C4AE /* Material.framework */; };
96A71FAC1C7646EC00C0C4AE /* Material.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 96A71FAA1C7646EC00C0C4AE /* Material.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
96A71FAF1C76476C00C0C4AE /* AppNavigationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71FAE1C76476C00C0C4AE /* AppNavigationViewController.swift */; };
96A71FC41C765FDF00C0C4AE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71FC31C765FDF00C0C4AE /* AppDelegate.swift */; };
96A71FC61C765FDF00C0C4AE /* AppNavigationBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71FC51C765FDF00C0C4AE /* AppNavigationBarViewController.swift */; };
96A71FCB1C765FDF00C0C4AE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96A71FCA1C765FDF00C0C4AE /* Assets.xcassets */; };
96A71FCE1C765FDF00C0C4AE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 96A71FCC1C765FDF00C0C4AE /* LaunchScreen.storyboard */; };
96A71FD61C76618D00C0C4AE /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71FD51C76618D00C0C4AE /* MainViewController.swift */; };
96A71FD81C7661D200C0C4AE /* Material.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96A71FD71C7661D200C0C4AE /* Material.framework */; };
96A71FD91C7661D200C0C4AE /* Material.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 96A71FD71C7661D200C0C4AE /* Material.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
96A71FAD1C7646ED00C0C4AE /* Embed Frameworks */ = {
96A71FDA1C7661D200C0C4AE /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
96A71FAC1C7646EC00C0C4AE /* Material.framework in Embed Frameworks */,
96A71FD91C7661D200C0C4AE /* Material.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
......@@ -31,95 +31,95 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
96A71F951C76469700C0C4AE /* NavigationViewController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NavigationViewController.app; sourceTree = BUILT_PRODUCTS_DIR; };
96A71F981C76469700C0C4AE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
96A71F9A1C76469700C0C4AE /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
96A71F9F1C76469700C0C4AE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
96A71FA21C76469700C0C4AE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
96A71FA41C76469700C0C4AE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
96A71FAA1C7646EC00C0C4AE /* Material.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = Material.framework; path = "/Users/danieldahan/Library/Developer/Xcode/DerivedData/Material-hbpnflxhoouqxebjcyhbbhqyesjd/Build/Products/Debug-iphoneos/Material.framework"; sourceTree = "<absolute>"; };
96A71FAE1C76476C00C0C4AE /* AppNavigationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppNavigationViewController.swift; sourceTree = "<group>"; };
96A71FC01C765FDF00C0C4AE /* NavigationBarViewController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NavigationBarViewController.app; sourceTree = BUILT_PRODUCTS_DIR; };
96A71FC31C765FDF00C0C4AE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
96A71FC51C765FDF00C0C4AE /* AppNavigationBarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppNavigationBarViewController.swift; sourceTree = "<group>"; };
96A71FCA1C765FDF00C0C4AE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
96A71FCD1C765FDF00C0C4AE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
96A71FCF1C765FDF00C0C4AE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
96A71FD51C76618D00C0C4AE /* MainViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
96A71FD71C7661D200C0C4AE /* Material.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = Material.framework; path = "/Users/danieldahan/Library/Developer/Xcode/DerivedData/Material-hbpnflxhoouqxebjcyhbbhqyesjd/Build/Products/Debug-iphoneos/Material.framework"; sourceTree = "<absolute>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
96A71F921C76469700C0C4AE /* Frameworks */ = {
96A71FBD1C765FDF00C0C4AE /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
96A71FAB1C7646EC00C0C4AE /* Material.framework in Frameworks */,
96A71FD81C7661D200C0C4AE /* Material.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
96A71F8C1C76469700C0C4AE = {
96A71FB71C765FDF00C0C4AE = {
isa = PBXGroup;
children = (
96A71FAA1C7646EC00C0C4AE /* Material.framework */,
96A71F971C76469700C0C4AE /* NavigationViewController */,
96A71F961C76469700C0C4AE /* Products */,
96A71FD71C7661D200C0C4AE /* Material.framework */,
96A71FC21C765FDF00C0C4AE /* NavigationBarViewController */,
96A71FC11C765FDF00C0C4AE /* Products */,
);
sourceTree = "<group>";
};
96A71F961C76469700C0C4AE /* Products */ = {
96A71FC11C765FDF00C0C4AE /* Products */ = {
isa = PBXGroup;
children = (
96A71F951C76469700C0C4AE /* NavigationViewController.app */,
96A71FC01C765FDF00C0C4AE /* NavigationBarViewController.app */,
);
name = Products;
sourceTree = "<group>";
};
96A71F971C76469700C0C4AE /* NavigationViewController */ = {
96A71FC21C765FDF00C0C4AE /* NavigationBarViewController */ = {
isa = PBXGroup;
children = (
96A71F981C76469700C0C4AE /* AppDelegate.swift */,
96A71FAE1C76476C00C0C4AE /* AppNavigationViewController.swift */,
96A71F9A1C76469700C0C4AE /* MainViewController.swift */,
96A71F9F1C76469700C0C4AE /* Assets.xcassets */,
96A71FA11C76469700C0C4AE /* LaunchScreen.storyboard */,
96A71FA41C76469700C0C4AE /* Info.plist */,
96A71FC31C765FDF00C0C4AE /* AppDelegate.swift */,
96A71FC51C765FDF00C0C4AE /* AppNavigationBarViewController.swift */,
96A71FD51C76618D00C0C4AE /* MainViewController.swift */,
96A71FCA1C765FDF00C0C4AE /* Assets.xcassets */,
96A71FCC1C765FDF00C0C4AE /* LaunchScreen.storyboard */,
96A71FCF1C765FDF00C0C4AE /* Info.plist */,
);
path = NavigationViewController;
path = NavigationBarViewController;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
96A71F941C76469700C0C4AE /* NavigationViewController */ = {
96A71FBF1C765FDF00C0C4AE /* NavigationBarViewController */ = {
isa = PBXNativeTarget;
buildConfigurationList = 96A71FA71C76469700C0C4AE /* Build configuration list for PBXNativeTarget "NavigationViewController" */;
buildConfigurationList = 96A71FD21C765FDF00C0C4AE /* Build configuration list for PBXNativeTarget "NavigationBarViewController" */;
buildPhases = (
96A71F911C76469700C0C4AE /* Sources */,
96A71F921C76469700C0C4AE /* Frameworks */,
96A71F931C76469700C0C4AE /* Resources */,
96A71FAD1C7646ED00C0C4AE /* Embed Frameworks */,
96A71FBC1C765FDF00C0C4AE /* Sources */,
96A71FBD1C765FDF00C0C4AE /* Frameworks */,
96A71FBE1C765FDF00C0C4AE /* Resources */,
96A71FDA1C7661D200C0C4AE /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = NavigationViewController;
productName = NavigationViewController;
productReference = 96A71F951C76469700C0C4AE /* NavigationViewController.app */;
name = NavigationBarViewController;
productName = NavigationBarViewController;
productReference = 96A71FC01C765FDF00C0C4AE /* NavigationBarViewController.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
96A71F8D1C76469700C0C4AE /* Project object */ = {
96A71FB81C765FDF00C0C4AE /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0720;
ORGANIZATIONNAME = "CosmicMind, Inc.";
TargetAttributes = {
96A71F941C76469700C0C4AE = {
96A71FBF1C765FDF00C0C4AE = {
CreatedOnToolsVersion = 7.2;
};
};
};
buildConfigurationList = 96A71F901C76469700C0C4AE /* Build configuration list for PBXProject "NavigationViewController" */;
buildConfigurationList = 96A71FBB1C765FDF00C0C4AE /* Build configuration list for PBXProject "NavigationBarViewController" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
......@@ -127,46 +127,46 @@
en,
Base,
);
mainGroup = 96A71F8C1C76469700C0C4AE;
productRefGroup = 96A71F961C76469700C0C4AE /* Products */;
mainGroup = 96A71FB71C765FDF00C0C4AE;
productRefGroup = 96A71FC11C765FDF00C0C4AE /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
96A71F941C76469700C0C4AE /* NavigationViewController */,
96A71FBF1C765FDF00C0C4AE /* NavigationBarViewController */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
96A71F931C76469700C0C4AE /* Resources */ = {
96A71FBE1C765FDF00C0C4AE /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
96A71FA31C76469700C0C4AE /* LaunchScreen.storyboard in Resources */,
96A71FA01C76469700C0C4AE /* Assets.xcassets in Resources */,
96A71FCE1C765FDF00C0C4AE /* LaunchScreen.storyboard in Resources */,
96A71FCB1C765FDF00C0C4AE /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
96A71F911C76469700C0C4AE /* Sources */ = {
96A71FBC1C765FDF00C0C4AE /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
96A71F9B1C76469700C0C4AE /* MainViewController.swift in Sources */,
96A71FAF1C76476C00C0C4AE /* AppNavigationViewController.swift in Sources */,
96A71F991C76469700C0C4AE /* AppDelegate.swift in Sources */,
96A71FD61C76618D00C0C4AE /* MainViewController.swift in Sources */,
96A71FC61C765FDF00C0C4AE /* AppNavigationBarViewController.swift in Sources */,
96A71FC41C765FDF00C0C4AE /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
96A71FA11C76469700C0C4AE /* LaunchScreen.storyboard */ = {
96A71FCC1C765FDF00C0C4AE /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
96A71FA21C76469700C0C4AE /* Base */,
96A71FCD1C765FDF00C0C4AE /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
......@@ -174,7 +174,7 @@
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
96A71FA51C76469700C0C4AE /* Debug */ = {
96A71FD01C765FDF00C0C4AE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
......@@ -219,7 +219,7 @@
};
name = Debug;
};
96A71FA61C76469700C0C4AE /* Release */ = {
96A71FD11C765FDF00C0C4AE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
......@@ -257,24 +257,24 @@
};
name = Release;
};
96A71FA81C76469700C0C4AE /* Debug */ = {
96A71FD31C765FDF00C0C4AE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = NavigationViewController/Info.plist;
INFOPLIST_FILE = NavigationBarViewController/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.NavigationViewController;
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.NavigationBarViewController;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
96A71FA91C76469700C0C4AE /* Release */ = {
96A71FD41C765FDF00C0C4AE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = NavigationViewController/Info.plist;
INFOPLIST_FILE = NavigationBarViewController/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.NavigationViewController;
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.NavigationBarViewController;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
......@@ -282,25 +282,25 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
96A71F901C76469700C0C4AE /* Build configuration list for PBXProject "NavigationViewController" */ = {
96A71FBB1C765FDF00C0C4AE /* Build configuration list for PBXProject "NavigationBarViewController" */ = {
isa = XCConfigurationList;
buildConfigurations = (
96A71FA51C76469700C0C4AE /* Debug */,
96A71FA61C76469700C0C4AE /* Release */,
96A71FD01C765FDF00C0C4AE /* Debug */,
96A71FD11C765FDF00C0C4AE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
96A71FA71C76469700C0C4AE /* Build configuration list for PBXNativeTarget "NavigationViewController" */ = {
96A71FD21C765FDF00C0C4AE /* Build configuration list for PBXNativeTarget "NavigationBarViewController" */ = {
isa = XCConfigurationList;
buildConfigurations = (
96A71FA81C76469700C0C4AE /* Debug */,
96A71FA91C76469700C0C4AE /* Release */,
96A71FD31C765FDF00C0C4AE /* Debug */,
96A71FD41C765FDF00C0C4AE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 96A71F8D1C76469700C0C4AE /* Project object */;
rootObject = 96A71FB81C765FDF00C0C4AE /* Project object */;
}
......@@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:NavigationViewController.xcodeproj">
location = "self:NavigationBarViewController.xcodeproj">
</FileRef>
</Workspace>
......@@ -39,7 +39,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = AppNavigationViewController(mainViewController: MainViewController())
window!.rootViewController = AppNavigationBarViewController(mainViewController: MainViewController())
window!.makeKeyAndVisible()
return true
}
......
......@@ -29,14 +29,14 @@
*/
/*
The following is an example of using a NavigationViewController to control the
flow of your application.
The following is an example of using a NavigationBarViewController to control the
flow of your application.
*/
import UIKit
import Material
class AppNavigationViewController: NavigationViewController {
class AppNavigationBarViewController: NavigationBarViewController {
/// Menu backdrop layer.
private lazy var menuBackdropLayer: MaterialLayer = MaterialLayer()
......@@ -59,18 +59,18 @@ class AppNavigationViewController: NavigationViewController {
/**
Handles the menu button click, which opens the
SideNavigationViewController.
SideNavigationBarViewController.
*/
func handleMenuButton() {
sideNavigationViewController?.openLeftView()
sideNavigationBarViewController?.openLeftView()
}
/**
Handles the more button click, which opens the
SideNavigationViewController.
SideNavigationBarViewController.
*/
func handleMoreButton() {
sideNavigationViewController?.openRightView()
sideNavigationBarViewController?.openRightView()
}
/// Handle the menuView touch event.
......@@ -210,7 +210,7 @@ class AppNavigationViewController: NavigationViewController {
/// Displays the menuBackdropLayer.
private func showMenuBackdropLayer() {
// Disable the side nav, so users can't swipe while viewing the menu.
sideNavigationViewController?.enabled = false
sideNavigationBarViewController?.enabled = false
// Position the menuBackdropLayer for the animation when opening.
MaterialAnimation.animationDisabled { [unowned self] in
......@@ -225,7 +225,7 @@ class AppNavigationViewController: NavigationViewController {
/// Hides the menuBackdropLayer.
private func hideMenuBackdropLayer() {
// Enable the side nav.
sideNavigationViewController?.enabled = true
sideNavigationBarViewController?.enabled = true
// Position the menuBackdropLayer for the animation when closing.
menuBackdropLayer.animate(MaterialAnimation.animationGroup([
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_menu_white.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_menu_white_2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_menu_white_3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_more_horiz_white.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_more_horiz_white_2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_more_horiz_white_3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
......@@ -53,10 +53,10 @@ class MainViewController: UIViewController {
/**
Handles the search button click, which opens the
SideNavigationViewController.
SideNavigationBarViewController.
*/
func handleSearchButton() {
sideNavigationViewController?.openRightView()
sideNavigationBarViewController?.openRightView()
}
/// Prepares view.
......@@ -130,7 +130,7 @@ extension MainViewController: UITableViewDataSource {
header.addSubview(label)
label.translatesAutoresizingMaskIntoConstraints = false
MaterialLayout.alignToParent(header, child: label, left: navigationViewController!.navigationBarView.contentInset.left + navigationViewController!.navigationBarView.spacing)
MaterialLayout.alignToParent(header, child: label, left: navigationBarViewController!.navigationBarView.contentInset.left + navigationBarViewController!.navigationBarView.spacing)
return header
}
......
......@@ -39,7 +39,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = SideNavigationViewController(mainViewController: AppNavigationViewController(mainViewController: FeedViewController()), leftViewController: LeftViewController(), rightViewController: RightViewController())
window!.rootViewController = SideNavigationBarViewController(mainViewController: AppNavigationBarViewController(mainViewController: FeedViewController()), leftViewController: LeftViewController(), rightViewController: RightViewController())
window!.makeKeyAndVisible()
return true
}
......
......@@ -30,15 +30,15 @@
/*
The following is an example of setting a UITableView as the MainViewController
within a SideNavigationViewController. There is a NavigationBarView that is
within a SideNavigationBarViewController. There is a NavigationBarView that is
used for navigation, with a menu button that opens the
SideNavigationViewController.
SideNavigationBarViewController.
*/
import UIKit
import Material
class AppNavigationViewController: NavigationViewController {
class AppNavigationBarViewController: NavigationBarViewController {
/// Menu backdrop layer.
private lazy var menuBackdropLayer: MaterialLayer = MaterialLayer()
......@@ -63,29 +63,29 @@ class AppNavigationViewController: NavigationViewController {
super.viewWillAppear(animated)
/*
Set the width of the SideNavigationViewController. Be mindful
Set the width of the SideNavigationBarViewController. Be mindful
of when setting this value. It is set in the viewWillAppear method,
because any earlier may cause a race condition when instantiating
the MainViewController and SideViewController.
*/
// sideNavigationViewController?.setLeftViewWidth(view.bounds.width - menuViewDiameter - 2 * menuViewInset, hidden: true, animated: false)
sideNavigationViewController?.delegate = self
// sideNavigationBarViewController?.setLeftViewWidth(view.bounds.width - menuViewDiameter - 2 * menuViewInset, hidden: true, animated: false)
sideNavigationBarViewController?.delegate = self
}
/**
Handles the menu button click, which opens the
SideNavigationViewController.
SideNavigationBarViewController.
*/
func handleMenuButton() {
sideNavigationViewController?.openLeftView()
sideNavigationBarViewController?.openLeftView()
}
/**
Handles the more button click, which opens the
SideNavigationViewController.
SideNavigationBarViewController.
*/
func handleMoreButton() {
sideNavigationViewController?.openRightView()
sideNavigationBarViewController?.openRightView()
}
/// Handle the menuView touch event.
......@@ -225,7 +225,7 @@ class AppNavigationViewController: NavigationViewController {
/// Displays the menuBackdropLayer.
private func showMenuBackdropLayer() {
// Disable the side nav, so users can't swipe while viewing the menu.
sideNavigationViewController?.enabled = false
sideNavigationBarViewController?.enabled = false
// Position the menuBackdropLayer for the animation when opening.
MaterialAnimation.animationDisabled { [unowned self] in
......@@ -240,7 +240,7 @@ class AppNavigationViewController: NavigationViewController {
/// Hides the menuBackdropLayer.
private func hideMenuBackdropLayer() {
// Enable the side nav.
sideNavigationViewController?.enabled = true
sideNavigationBarViewController?.enabled = true
// Position the menuBackdropLayer for the animation when closing.
menuBackdropLayer.animate(MaterialAnimation.animationGroup([
......@@ -254,69 +254,69 @@ class AppNavigationViewController: NavigationViewController {
}
}
/// SideNavigationViewControllerDelegate methods.
extension AppNavigationViewController: SideNavigationViewControllerDelegate {
/// SideNavigationBarViewControllerDelegate methods.
extension AppNavigationBarViewController: SideNavigationBarViewControllerDelegate {
/**
An optional delegation method that is fired before the
SideNavigationViewController opens.
SideNavigationBarViewController opens.
*/
func sideNavigationViewWillOpen(sideNavigationViewController: SideNavigationViewController, position: SideNavigationPosition) {
func sideNavigationViewWillOpen(sideNavigationBarViewController: SideNavigationBarViewController, position: SideNavigationPosition) {
print("Will open", .Left == position ? "Left" : "Right", "view.")
}
/**
An optional delegation method that is fired after the
SideNavigationViewController opened.
SideNavigationBarViewController opened.
*/
func sideNavigationViewDidOpen(sideNavigationViewController: SideNavigationViewController, position: SideNavigationPosition) {
func sideNavigationViewDidOpen(sideNavigationBarViewController: SideNavigationBarViewController, position: SideNavigationPosition) {
print("Did open", .Left == position ? "Left" : "Right", "view.")
}
/**
An optional delegation method that is fired before the
SideNavigationViewController closes.
SideNavigationBarViewController closes.
*/
func sideNavigationViewWillClose(sideNavigationViewController: SideNavigationViewController, position: SideNavigationPosition) {
func sideNavigationViewWillClose(sideNavigationBarViewController: SideNavigationBarViewController, position: SideNavigationPosition) {
print("Will close", .Left == position ? "Left" : "Right", "view.")
}
/**
An optional delegation method that is fired after the
SideNavigationViewController closed.
SideNavigationBarViewController closed.
*/
func sideNavigationViewDidClose(sideNavigationViewController: SideNavigationViewController, position: SideNavigationPosition) {
func sideNavigationViewDidClose(sideNavigationBarViewController: SideNavigationBarViewController, position: SideNavigationPosition) {
print("Did close", .Left == position ? "Left" : "Right", "view.")
}
/**
An optional delegation method that is fired when the
SideNavigationViewController pan gesture begins.
SideNavigationBarViewController pan gesture begins.
*/
func sideNavigationViewPanDidBegin(sideNavigationViewController: SideNavigationViewController, point: CGPoint, position: SideNavigationPosition) {
func sideNavigationViewPanDidBegin(sideNavigationBarViewController: SideNavigationBarViewController, point: CGPoint, position: SideNavigationPosition) {
print("Pan did begin for", .Left == position ? "Left" : "Right", "view.")
}
/**
An optional delegation method that is fired when the
SideNavigationViewController pan gesture changes position.
SideNavigationBarViewController pan gesture changes position.
*/
func sideNavigationViewPanDidChange(sideNavigationViewController: SideNavigationViewController, point: CGPoint, position: SideNavigationPosition) {
func sideNavigationViewPanDidChange(sideNavigationBarViewController: SideNavigationBarViewController, point: CGPoint, position: SideNavigationPosition) {
print("Pan did change for", .Left == position ? "Left" : "Right", "view.")
}
/**
An optional delegation method that is fired when the
SideNavigationViewController pan gesture ends.
SideNavigationBarViewController pan gesture ends.
*/
func sideNavigationViewPanDidEnd(sideNavigationViewController: SideNavigationViewController, point: CGPoint, position: SideNavigationPosition) {
func sideNavigationViewPanDidEnd(sideNavigationBarViewController: SideNavigationBarViewController, point: CGPoint, position: SideNavigationPosition) {
print("Pan did end for", .Left == position ? "Left" : "Right", "view.")
}
/**
An optional delegation method that is fired when the
SideNavigationViewController tap gesture executes.
SideNavigationBarViewController tap gesture executes.
*/
func sideNavigationViewDidTap(sideNavigationViewController: SideNavigationViewController, point: CGPoint, position: SideNavigationPosition) {
func sideNavigationViewDidTap(sideNavigationBarViewController: SideNavigationBarViewController, point: CGPoint, position: SideNavigationPosition) {
print("Did Tap for", .Left == position ? "Left" : "Right", "view.")
}
}
......@@ -53,10 +53,10 @@ class FeedViewController: UIViewController {
/**
Handles the search button click, which opens the
SideNavigationViewController.
SideNavigationBarViewController.
*/
func handleSearchButton() {
sideNavigationViewController?.openRightView()
sideNavigationBarViewController?.openRightView()
}
/// Prepares view.
......@@ -130,7 +130,7 @@ extension FeedViewController: UITableViewDataSource {
header.addSubview(label)
label.translatesAutoresizingMaskIntoConstraints = false
MaterialLayout.alignToParent(header, child: label, left: navigationViewController!.navigationBarView.contentInset.left + navigationViewController!.navigationBarView.spacing)
MaterialLayout.alignToParent(header, child: label, left: navigationBarViewController!.navigationBarView.contentInset.left + navigationBarViewController!.navigationBarView.spacing)
return header
}
......
......@@ -30,7 +30,7 @@
/*
The following is an example of setting a UITableView as the LeftViewController
within a SideNavigationViewController.
within a SideNavigationBarViewController.
*/
import UIKit
......
......@@ -30,7 +30,7 @@
/*
The following is an example of setting a UITableView as the RightViewController
within a SideNavigationViewController.
within a SideNavigationBarViewController.
*/
import UIKit
......
......@@ -43,9 +43,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
let mainViewController = storyboard.instantiateViewControllerWithIdentifier("MainViewController") as! MainViewController
let sideViewController = storyboard.instantiateViewControllerWithIdentifier("SideViewController") as! SideViewController
// Configure the window with the SideNavigationViewController as the root view controller
// Configure the window with the SideNavigationBarViewController as the root view controller
window = UIWindow(frame: UIScreen.mainScreen().bounds)
window?.rootViewController = SideNavigationViewController(mainViewController: mainViewController, leftViewController: sideViewController)
window?.rootViewController = SideNavigationBarViewController(mainViewController: mainViewController, leftViewController: sideViewController)
window?.makeKeyAndVisible()
return true
}
......
......@@ -36,7 +36,7 @@ class MainViewController: UIViewController {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
// Toggle SideNavigationViewController.
// Toggle SideNavigationBarViewController.
let img: UIImage? = UIImage(named: "ic_create_white")
let fabButton: FabButton = FabButton()
fabButton.setImage(img, forState: .Normal)
......@@ -51,7 +51,7 @@ class MainViewController: UIViewController {
// FabButton handler.
func handleFabButton() {
sideNavigationViewController?.toggleLeftView()
sideNavigationBarViewController?.toggleLeftView()
}
}
......@@ -41,7 +41,7 @@
96A71EBB1C6FCFA300C0C4AE /* MenuView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96A71E901C6FBC2200C0C4AE /* MenuView.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96A71EC71C6FFF0500C0C4AE /* MaterialSwitch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71EC61C6FFF0500C0C4AE /* MaterialSwitch.swift */; };
96A71EF61C71127100C0C4AE /* SearchBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71EF51C71127100C0C4AE /* SearchBarView.swift */; };
96A71F301C72E41100C0C4AE /* NavigationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71F2F1C72E41100C0C4AE /* NavigationViewController.swift */; };
96A71F301C72E41100C0C4AE /* NavigationBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71F2F1C72E41100C0C4AE /* NavigationBarViewController.swift */; };
96A71F451C74ABCB00C0C4AE /* MaterialBorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71F441C74ABCB00C0C4AE /* MaterialBorder.swift */; };
96A71FB31C764E3200C0C4AE /* StatusBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71FB21C764E3200C0C4AE /* StatusBarView.swift */; };
96A71FB61C7651AA00C0C4AE /* ControlView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71FB01C7649F800C0C4AE /* ControlView.swift */; };
......@@ -145,7 +145,7 @@
96A71E901C6FBC2200C0C4AE /* MenuView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MenuView.swift; sourceTree = "<group>"; };
96A71EC61C6FFF0500C0C4AE /* MaterialSwitch.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialSwitch.swift; sourceTree = "<group>"; };
96A71EF51C71127100C0C4AE /* SearchBarView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchBarView.swift; sourceTree = "<group>"; };
96A71F2F1C72E41100C0C4AE /* NavigationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationViewController.swift; sourceTree = "<group>"; };
96A71F2F1C72E41100C0C4AE /* NavigationBarViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationBarViewController.swift; sourceTree = "<group>"; };
96A71F441C74ABCB00C0C4AE /* MaterialBorder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialBorder.swift; sourceTree = "<group>"; };
96A71FB01C7649F800C0C4AE /* ControlView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ControlView.swift; sourceTree = "<group>"; };
96A71FB21C764E3200C0C4AE /* StatusBarView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StatusBarView.swift; sourceTree = "<group>"; };
......@@ -464,7 +464,7 @@
isa = PBXGroup;
children = (
96D88C151C1328D800B91418 /* NavigationBarView.swift */,
96A71F2F1C72E41100C0C4AE /* NavigationViewController.swift */,
96A71F2F1C72E41100C0C4AE /* NavigationBarViewController.swift */,
96D88C1D1C1328D800B91418 /* SideNavigationViewController.swift */,
);
name = Navigation;
......@@ -672,7 +672,7 @@
96D88C2D1C1328D800B91418 /* MaterialDepth.swift in Sources */,
96D88C331C1328D800B91418 /* MaterialLabel.swift in Sources */,
96D88C281C1328D800B91418 /* MaterialAnimation.swift in Sources */,
96A71F301C72E41100C0C4AE /* NavigationViewController.swift in Sources */,
96A71F301C72E41100C0C4AE /* NavigationBarViewController.swift in Sources */,
960B232E1C383EAA00E96216 /* Material+UIImage.swift in Sources */,
96D88C451C1328D800B91418 /* RobotoFont.swift in Sources */,
96D88C1F1C1328D800B91418 /* CardView.swift in Sources */,
......
......@@ -30,6 +30,10 @@
import UIKit
@objc(NavigationBarViewDelegate)
public protocol NavigationBarViewDelegate : StatusBarViewDelegate {}
public class NavigationBarView : StatusBarView {
/// Title label.
public var titleLabel: UILabel? {
......@@ -124,12 +128,6 @@ public class NavigationBarView : StatusBarView {
*/
public override func prepareView() {
super.prepareView()
depth = .Depth1
grid.spacing = 8
grid.contentInset.left = 8
grid.contentInset.bottom = 8
grid.contentInset.right = 8
grid.axis.inherited = false
contentView.grid.axis.direction = .Vertical
}
......
......@@ -32,15 +32,15 @@ import UIKit
public extension UIViewController {
/**
A convenience property that provides access to the NavigationViewController.
This is the recommended method of accessing the NavigationViewController
A convenience property that provides access to the NavigationBarViewController.
This is the recommended method of accessing the NavigationBarViewController
through child UIViewControllers.
*/
public var navigationViewController: NavigationViewController? {
public var navigationBarViewController: NavigationBarViewController? {
var viewController: UIViewController? = self
while nil != viewController {
if viewController is NavigationViewController {
return viewController as? NavigationViewController
if viewController is NavigationBarViewController {
return viewController as? NavigationBarViewController
}
viewController = viewController?.parentViewController
}
......@@ -48,7 +48,7 @@ public extension UIViewController {
}
}
public class NavigationViewController: UIViewController {
public class NavigationBarViewController: UIViewController {
public private(set) lazy var navigationBarView: NavigationBarView = NavigationBarView()
/**
......@@ -73,7 +73,7 @@ public class NavigationViewController: UIViewController {
public private(set) var mainViewController: UIViewController!
/**
An initializer for the NavigationViewController.
An initializer for the NavigationBarViewController.
- Parameter mainViewController: The main UIViewController.
*/
public convenience init(mainViewController: UIViewController) {
......@@ -120,7 +120,7 @@ public class NavigationViewController: UIViewController {
})
}
/// A method that generally prepares the NavigationViewController.
/// A method that generally prepares the NavigationBarViewController.
private func prepareView() {
prepareNavigationBarView()
prepareMainViewController()
......@@ -139,7 +139,7 @@ public class NavigationViewController: UIViewController {
/**
A method that adds the passed in controller as a child of
the NavigationViewController within the passed in
the NavigationBarViewController within the passed in
container view.
- Parameter viewController: A UIViewController to add as a child.
- Parameter container: A UIView that is the parent of the
......@@ -161,7 +161,7 @@ public class NavigationViewController: UIViewController {
}
}
extension NavigationViewController : StatusBarViewDelegate {
extension NavigationBarViewController : NavigationBarViewDelegate {
/// Monitor layout changes.
public func statusBarViewDidChangeLayout(statusBarView: StatusBarView) {
layoutSubviews()
......
......@@ -38,15 +38,15 @@ public enum SideNavigationPosition : NSInteger {
public extension UIViewController {
/**
A convenience property that provides access to the SideNavigationViewController.
This is the recommended method of accessing the SideNavigationViewController
A convenience property that provides access to the SideNavigationBarViewController.
This is the recommended method of accessing the SideNavigationBarViewController
through child UIViewControllers.
*/
public var sideNavigationViewController: SideNavigationViewController? {
public var sideNavigationBarViewController: SideNavigationBarViewController? {
var viewController: UIViewController? = self
while nil != viewController {
if viewController is SideNavigationViewController {
return viewController as? SideNavigationViewController
if viewController is SideNavigationBarViewController {
return viewController as? SideNavigationBarViewController
}
viewController = viewController?.parentViewController
}
......@@ -54,59 +54,59 @@ public extension UIViewController {
}
}
@objc(SideNavigationViewControllerDelegate)
public protocol SideNavigationViewControllerDelegate {
@objc(SideNavigationBarViewControllerDelegate)
public protocol SideNavigationBarViewControllerDelegate {
/**
An optional delegation method that is fired before the
SideNavigationViewController opens.
SideNavigationBarViewController opens.
*/
optional func sideNavigationViewWillOpen(sideNavigationViewController: SideNavigationViewController, position: SideNavigationPosition)
optional func sideNavigationViewWillOpen(sideNavigationBarViewController: SideNavigationBarViewController, position: SideNavigationPosition)
/**
An optional delegation method that is fired after the
SideNavigationViewController opened.
SideNavigationBarViewController opened.
*/
optional func sideNavigationViewDidOpen(sideNavigationViewController: SideNavigationViewController, position: SideNavigationPosition)
optional func sideNavigationViewDidOpen(sideNavigationBarViewController: SideNavigationBarViewController, position: SideNavigationPosition)
/**
An optional delegation method that is fired before the
SideNavigationViewController closes.
SideNavigationBarViewController closes.
*/
optional func sideNavigationViewWillClose(sideNavigationViewController: SideNavigationViewController, position: SideNavigationPosition)
optional func sideNavigationViewWillClose(sideNavigationBarViewController: SideNavigationBarViewController, position: SideNavigationPosition)
/**
An optional delegation method that is fired after the
SideNavigationViewController closed.
SideNavigationBarViewController closed.
*/
optional func sideNavigationViewDidClose(sideNavigationViewController: SideNavigationViewController, position: SideNavigationPosition)
optional func sideNavigationViewDidClose(sideNavigationBarViewController: SideNavigationBarViewController, position: SideNavigationPosition)
/**
An optional delegation method that is fired when the
SideNavigationViewController pan gesture begins.
SideNavigationBarViewController pan gesture begins.
*/
optional func sideNavigationViewPanDidBegin(sideNavigationViewController: SideNavigationViewController, point: CGPoint, position: SideNavigationPosition)
optional func sideNavigationViewPanDidBegin(sideNavigationBarViewController: SideNavigationBarViewController, point: CGPoint, position: SideNavigationPosition)
/**
An optional delegation method that is fired when the
SideNavigationViewController pan gesture changes position.
SideNavigationBarViewController pan gesture changes position.
*/
optional func sideNavigationViewPanDidChange(sideNavigationViewController: SideNavigationViewController, point: CGPoint, position: SideNavigationPosition)
optional func sideNavigationViewPanDidChange(sideNavigationBarViewController: SideNavigationBarViewController, point: CGPoint, position: SideNavigationPosition)
/**
An optional delegation method that is fired when the
SideNavigationViewController pan gesture ends.
SideNavigationBarViewController pan gesture ends.
*/
optional func sideNavigationViewPanDidEnd(sideNavigationViewController: SideNavigationViewController, point: CGPoint, position: SideNavigationPosition)
optional func sideNavigationViewPanDidEnd(sideNavigationBarViewController: SideNavigationBarViewController, point: CGPoint, position: SideNavigationPosition)
/**
An optional delegation method that is fired when the
SideNavigationViewController tap gesture executes.
SideNavigationBarViewController tap gesture executes.
*/
optional func sideNavigationViewDidTap(sideNavigationViewController: SideNavigationViewController, point: CGPoint, position: SideNavigationPosition)
optional func sideNavigationViewDidTap(sideNavigationBarViewController: SideNavigationBarViewController, point: CGPoint, position: SideNavigationPosition)
}
@objc(SideNavigationViewController)
public class SideNavigationViewController: UIViewController, UIGestureRecognizerDelegate {
@objc(SideNavigationBarViewController)
public class SideNavigationBarViewController: UIViewController, UIGestureRecognizerDelegate {
/**
A CGFloat property that is used internally to track
the original (x) position of the container view when panning.
......@@ -135,7 +135,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
/**
A CGFloat property that accesses the leftView threshold of
the SideNavigationViewController. When the panning gesture has
the SideNavigationBarViewController. When the panning gesture has
ended, if the position is beyond the threshold,
the leftView is opened, if it is below the threshold, the
leftView is closed. The leftViewThreshold is always at half
......@@ -145,7 +145,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
/**
A CGFloat property that accesses the rightView threshold of
the SideNavigationViewController. When the panning gesture has
the SideNavigationBarViewController. When the panning gesture has
ended, if the position is beyond the threshold,
the rightView is closed, if it is below the threshold, the
rightView is opened. The rightViewThreshold is always at half
......@@ -154,10 +154,10 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
public private(set) var rightViewThreshold: CGFloat = 0
/**
A SideNavigationViewControllerDelegate property used to bind
A SideNavigationBarViewControllerDelegate property used to bind
the delegation object.
*/
public weak var delegate: SideNavigationViewControllerDelegate?
public weak var delegate: SideNavigationBarViewControllerDelegate?
/**
A Boolean property used to enable and disable interactivity
......@@ -318,7 +318,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
public private(set) var rightViewWidth: CGFloat = 240
/**
An initializer for the SideNavigationViewController.
An initializer for the SideNavigationBarViewController.
- Parameter mainViewController: The main UIViewController.
- Parameter leftViewController: An Optional left UIViewController.
- Parameter rightViewController: An Optional right UIViewController.
......@@ -631,7 +631,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
/**
A method that is fired when the pan gesture is recognized
for the SideNavigationViewController.
for the SideNavigationBarViewController.
- Parameter recognizer: A UIPanGestureRecognizer that is
passed to the handler when recognized.
*/
......@@ -712,7 +712,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
/**
A method that is fired when the tap gesture is recognized
for the SideNavigationViewController.
for the SideNavigationBarViewController.
- Parameter recognizer: A UITapGestureRecognizer that is
passed to the handler when recognized.
*/
......@@ -735,7 +735,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
}
}
/// A method that generally prepares the SideNavigationViewController.
/// A method that generally prepares the SideNavigationBarViewController.
private func prepareView() {
prepareBackdropLayer()
prepareMainViewController()
......@@ -810,7 +810,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
/**
A method that adds the passed in controller as a child of
the SideNavigationViewController within the passed in
the SideNavigationBarViewController within the passed in
container view.
- Parameter viewController: A UIViewController to add as a child.
- Parameter container: A UIView that is the parent of the
......@@ -826,7 +826,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
/**
A method that prepares the gestures used within the
SideNavigationViewController.
SideNavigationBarViewController.
- Parameter panSelector: A Selector that is fired when the
pan gesture is recognized.
- Parameter tapSelector: A Selector that is fired when the
......@@ -883,7 +883,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
/**
A method that determines whether the passed point is
contained within the bounds of the leftViewThreshold
and height of the SideNavigationViewController view frame
and height of the SideNavigationBarViewController view frame
property.
- Parameter point: A CGPoint to test against.
- Returns: A Boolean of the result, true if yes, false
......@@ -896,7 +896,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
/**
A method that determines whether the passed point is
contained within the bounds of the rightViewThreshold
and height of the SideNavigationViewController view frame
and height of the SideNavigationBarViewController view frame
property.
- Parameter point: A CGPoint to test against.
- Returns: A Boolean of the result, true if yes, false
......
......@@ -94,6 +94,12 @@ public class StatusBarView : ControlView {
*/
public override func prepareView() {
super.prepareView()
depth = .Depth1
oldFrame = frame
grid.spacing = 8
grid.contentInset.left = 8
grid.contentInset.bottom = 8
grid.contentInset.right = 8
grid.axis.inherited = false
}
}
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