Commit 8b1fc4de by Daniel Dahan

updated SideNavigationController to NavigationDrawerController

parent e2ec3173
......@@ -86,7 +86,7 @@
location = "group:Programmatic/BottomNavigationController/BottomNavigationController.xcodeproj">
</FileRef>
<FileRef
location = "group:Programmatic/SideNavigationController/SideNavigationController.xcodeproj">
location = "group:Programmatic/NavigationDrawerController/NavigationDrawerController.xcodeproj">
</FileRef>
<FileRef
location = "group:Programmatic/CardView/CardView.xcodeproj">
......@@ -126,7 +126,7 @@
location = "group:Storyboards/BottomTabBar/BottomTabBar.xcodeproj">
</FileRef>
<FileRef
location = "group:Storyboards/SideNavigationController/SideNavigationController.xcodeproj">
location = "group:Storyboards/NavigationDrawerController/NavigationDrawerController.xcodeproj">
</FileRef>
</Group>
</Workspace>
......@@ -58,7 +58,7 @@ class AppBottomNavigationController: BottomNavigationController {
/// Handles the menuButton.
internal func handleMenuButton() {
sideNavigationController?.openLeftView()
navigationDrawerController?.openLeftView()
}
/// Handles the searchButton.
......
......@@ -40,11 +40,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
let bottomNavigationController: AppBottomNavigationController = AppBottomNavigationController()
let navigationController: AppNavigationController = AppNavigationController(rootViewController: bottomNavigationController)
let sideNavigationController: SideNavigationController = SideNavigationController(rootViewController: navigationController, leftViewController: AppLeftViewController())
sideNavigationController.statusBarStyle = .LightContent
let navigationDrawerController: NavigationDrawerController = NavigationDrawerController(rootViewController: navigationController, leftViewController: AppLeftViewController())
navigationDrawerController.statusBarStyle = .LightContent
window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = sideNavigationController
window!.rootViewController = navigationDrawerController
window!.makeKeyAndVisible()
return true
}
......
......@@ -30,7 +30,7 @@
/*
The following is an example of setting a UITableView as the LeftViewController
within a SideNavigationController.
within a NavigationDrawerController.
*/
import UIKit
......
......@@ -64,13 +64,13 @@ class AppMenuController: MenuController {
override func openMenu(completion: (() -> Void)? = nil) {
super.openMenu(completion)
sideNavigationController?.enabled = false
navigationDrawerController?.enabled = false
(menuView.menu.views?.first as? MaterialButton)?.animate(MaterialAnimation.rotate(angle: 45))
}
override func closeMenu(completion: (() -> Void)? = nil) {
super.closeMenu(completion)
sideNavigationController?.enabled = true
navigationDrawerController?.enabled = true
(menuView.menu.views?.first as? MaterialButton)?.animate(MaterialAnimation.rotate(angle: 0))
}
......
......@@ -46,7 +46,7 @@ class AppSearchBarController: SearchBarController {
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
statusBarStyle = .Default
sideNavigationController?.enabled = false
navigationDrawerController?.enabled = false
}
override func viewDidAppear(animated: Bool) {
......@@ -57,7 +57,7 @@ class AppSearchBarController: SearchBarController {
override func viewWillDisappear(animated: Bool) {
super.viewWillDisappear(animated)
searchBar.textField.resignFirstResponder()
sideNavigationController?.enabled = true
navigationDrawerController?.enabled = true
}
/// Toggle SideSearchViewController left UIViewController.
......
......@@ -74,7 +74,7 @@ class ItemViewController: UIViewController {
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
sideNavigationController?.enabled = false
navigationDrawerController?.enabled = false
}
override func viewWillLayoutSubviews() {
......
......@@ -51,7 +51,7 @@ class RecipesViewController: UIViewController {
automaticallyAdjustsScrollViewInsets = true
// Enable the SideNavigation.
sideNavigationController?.enabled = true
navigationDrawerController?.enabled = true
}
/// Prepares the items Array.
......
......@@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:SideNavigationViewController.xcodeproj">
location = "self:NavigationDrawerController.xcodeproj">
</FileRef>
</Workspace>
......@@ -38,20 +38,20 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let navigationController: NavigationController = NavigationController(rootViewController: YellowViewController())
let sideNavigationController: SideNavigationController = SideNavigationController(rootViewController: navigationController, leftViewController: AppLeftViewController(), rightViewController: BlueViewController())
let navigationDrawerController: NavigationDrawerController = NavigationDrawerController(rootViewController: navigationController, leftViewController: AppLeftViewController(), rightViewController: BlueViewController())
// sideNavigationController.enabled = true
//
// sideNavigationController.enabledLeftView = true
// sideNavigationController.enabledLeftTapGesture = true
// sideNavigationController.enabledLeftPanGesture = true
//
// sideNavigationController.enabledRightView = true
// sideNavigationController.enabledRightTapGesture = true
// sideNavigationController.enabledRightPanGesture = true
// navigationDrawerController.enabled = true
//
// navigationDrawerController.enabledLeftView = true
// navigationDrawerController.enabledLeftTapGesture = true
// navigationDrawerController.enabledLeftPanGesture = true
//
// navigationDrawerController.enabledRightView = true
// navigationDrawerController.enabledRightTapGesture = true
// navigationDrawerController.enabledRightPanGesture = true
window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = sideNavigationController
window!.rootViewController = navigationDrawerController
window!.makeKeyAndVisible()
return true
}
......
......@@ -116,21 +116,21 @@ extension AppLeftViewController: UITableViewDelegate {
switch item.text {
case "Orange":
sideNavigationController?.transitionFromRootViewController(OrangeViewController())
navigationDrawerController?.transitionFromRootViewController(OrangeViewController())
case "Purple":
sideNavigationController?.transitionFromRootViewController(PurpleViewController())
navigationDrawerController?.transitionFromRootViewController(PurpleViewController())
case "Green":
sideNavigationController?.transitionFromRootViewController(GreenViewController())
navigationDrawerController?.transitionFromRootViewController(GreenViewController())
case "Blue":
sideNavigationController?.transitionFromRootViewController(BlueViewController())
navigationDrawerController?.transitionFromRootViewController(BlueViewController())
case "Yellow":
// To close the sideNavigationController after loading the UIViewController, use the following.
sideNavigationController?.transitionFromRootViewController(YellowViewController(),
// To close the navigationDrawerController after loading the UIViewController, use the following.
navigationDrawerController?.transitionFromRootViewController(YellowViewController(),
duration: 1,
options: .TransitionNone,
animations: nil,
completion: { [weak self] _ in
self?.sideNavigationController?.closeLeftView()
self?.navigationDrawerController?.closeLeftView()
})
default:break
}
......
......@@ -2,8 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSApplicationCategoryType</key>
<string></string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
......
......@@ -44,7 +44,7 @@ class AppToolbarController: ToolbarController {
prepareToolbar()
}
/// Toggle SideNavigationController right UIViewController.
/// Toggle NavigationDrawerController right UIViewController.
internal func handleSearchButton() {
floatingViewController = GreenViewController()
......
......@@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:SideNavigationViewController.xcodeproj">
location = "self:NavigationDrawerController.xcodeproj">
</FileRef>
</Workspace>
......@@ -41,11 +41,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Get view controllers from storyboard
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let rootViewController = storyboard.instantiateViewControllerWithIdentifier("RootViewController") as! RootViewController
let sideViewController = storyboard.instantiateViewControllerWithIdentifier("SideViewController") as! SideViewController
let drawerViewController = storyboard.instantiateViewControllerWithIdentifier("DrawerViewController") as! DrawerViewController
// Configure the window with the SideNavigationController as the root view controller
// Configure the window with the NavigationDrawerController as the root view controller
window = UIWindow(frame: UIScreen.mainScreen().bounds)
window?.rootViewController = SideNavigationController(rootViewController: rootViewController, leftViewController: sideViewController)
window?.rootViewController = NavigationDrawerController(rootViewController: rootViewController, leftViewController: drawerViewController)
window?.makeKeyAndVisible()
return true
}
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Root View Controller-->
<scene sceneID="S32-pp-djU">
<scene sceneID="tne-QT-ifu">
<objects>
<viewController storyboardIdentifier="RootViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="huh-WT-4zU" customClass="RootViewController" customModule="SideNavigationViewController" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="BYZ-38-t0r" customClass="RootViewController" customModule="NavigationDrawerController" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="778-lO-FMj"/>
<viewControllerLayoutGuide type="bottom" id="hvu-kv-aLI"/>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="I6q-Is-0pO">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.3590823447" green="0.30467909450000003" blue="0.81552683250000002" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="I7q-uB-Qez" userLabel="First Responder" sceneMemberID="firstResponder"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="302" y="-329"/>
</scene>
<!--Side View Controller-->
<scene sceneID="tne-QT-ifu">
<!--Drawer View Controller-->
<scene sceneID="hLH-kg-mtG">
<objects>
<viewController storyboardIdentifier="SideViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="BYZ-38-t0r" customClass="SideViewController" customModule="SideNavigationViewController" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="06L-FT-Qi1" customClass="DrawerViewController" customModule="NavigationDrawerController" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
<viewControllerLayoutGuide type="top" id="6wn-C8-Wj8"/>
<viewControllerLayoutGuide type="bottom" id="2M5-ul-HvM"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<view key="view" contentMode="scaleToFill" id="e7g-Fd-L6H">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="h7a-OV-6Fo" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1575" y="913"/>
</scene>
</scenes>
</document>
......@@ -30,7 +30,7 @@
import UIKit
class SideViewController: UIViewController {
class DrawerViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
......
......@@ -24,6 +24,8 @@
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
......@@ -33,7 +35,13 @@
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
......@@ -36,8 +36,8 @@ class RootViewController: UIViewController {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
// Toggle SideNavigationController.
let img: UIImage? = UIImage(named: "ic_create_white")
// Toggle NavigationDrawerController.
let img: UIImage? = MaterialIcon.cm.pen
let fabButton: FabButton = FabButton()
fabButton.setImage(img, forState: .Normal)
fabButton.setImage(img, forState: .Highlighted)
......@@ -48,7 +48,7 @@ class RootViewController: UIViewController {
// FabButton handler.
func handleFabButton() {
sideNavigationController?.toggleLeftView()
navigationDrawerController?.toggleLeftView()
}
}
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_create_white.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_create_white@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_create_white@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
......@@ -79,7 +79,7 @@
96BCB7DD1CB40DC500C806FE /* RobotoFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BCB7941CB40DC500C806FE /* RobotoFont.swift */; };
96BCB7DE1CB40DC500C806FE /* SearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BCB7951CB40DC500C806FE /* SearchBar.swift */; };
96BCB7DF1CB40DC500C806FE /* SearchBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BCB7961CB40DC500C806FE /* SearchBarController.swift */; };
96BCB7E01CB40DC500C806FE /* SideNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BCB7971CB40DC500C806FE /* SideNavigationController.swift */; };
96BCB7E01CB40DC500C806FE /* NavigationDrawerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BCB7971CB40DC500C806FE /* NavigationDrawerController.swift */; };
96BCB7E11CB40DC500C806FE /* BarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BCB7981CB40DC500C806FE /* BarView.swift */; };
96BCB7E21CB40DC500C806FE /* BarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BCB7991CB40DC500C806FE /* BarController.swift */; };
96BCB7E31CB40DC500C806FE /* TabBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BCB79A1CB40DC500C806FE /* TabBar.swift */; };
......@@ -143,7 +143,7 @@
96BCB8381CB4115200C806FE /* ControlView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BCB75E1CB40DC500C806FE /* ControlView.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96BCB8391CB4115200C806FE /* SearchBar.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BCB7951CB40DC500C806FE /* SearchBar.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96BCB83A1CB4115200C806FE /* SearchBarController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BCB7961CB40DC500C806FE /* SearchBarController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96BCB83B1CB4115200C806FE /* SideNavigationController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BCB7971CB40DC500C806FE /* SideNavigationController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96BCB83B1CB4115200C806FE /* NavigationDrawerController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BCB7971CB40DC500C806FE /* NavigationDrawerController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96BCB83C1CB4115200C806FE /* BarView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BCB7981CB40DC500C806FE /* BarView.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96BCB83D1CB4115200C806FE /* BarController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BCB7991CB40DC500C806FE /* BarController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96BCB83E1CB4115200C806FE /* Menu.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BCB78D1CB40DC500C806FE /* Menu.swift */; settings = {ATTRIBUTES = (Public, ); }; };
......@@ -269,7 +269,7 @@
96BCB7941CB40DC500C806FE /* RobotoFont.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RobotoFont.swift; sourceTree = "<group>"; };
96BCB7951CB40DC500C806FE /* SearchBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchBar.swift; sourceTree = "<group>"; };
96BCB7961CB40DC500C806FE /* SearchBarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchBarController.swift; sourceTree = "<group>"; };
96BCB7971CB40DC500C806FE /* SideNavigationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SideNavigationController.swift; sourceTree = "<group>"; };
96BCB7971CB40DC500C806FE /* NavigationDrawerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationDrawerController.swift; sourceTree = "<group>"; };
96BCB7981CB40DC500C806FE /* BarView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BarView.swift; sourceTree = "<group>"; };
96BCB7991CB40DC500C806FE /* BarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BarController.swift; sourceTree = "<group>"; };
96BCB79A1CB40DC500C806FE /* TabBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TabBar.swift; sourceTree = "<group>"; };
......@@ -450,7 +450,7 @@
96BCB7901CB40DC500C806FE /* NavigationBar.swift */,
96BCB7911CB40DC500C806FE /* NavigationController.swift */,
96BCB7921CB40DC500C806FE /* NavigationItem.swift */,
96BCB7971CB40DC500C806FE /* SideNavigationController.swift */,
96BCB7971CB40DC500C806FE /* NavigationDrawerController.swift */,
);
name = Navigation;
sourceTree = "<group>";
......@@ -674,7 +674,7 @@
96BCB8381CB4115200C806FE /* ControlView.swift in Headers */,
96BCB8391CB4115200C806FE /* SearchBar.swift in Headers */,
96BCB83A1CB4115200C806FE /* SearchBarController.swift in Headers */,
96BCB83B1CB4115200C806FE /* SideNavigationController.swift in Headers */,
96BCB83B1CB4115200C806FE /* NavigationDrawerController.swift in Headers */,
96BCB83C1CB4115200C806FE /* BarView.swift in Headers */,
96BCB83D1CB4115200C806FE /* BarController.swift in Headers */,
96BCB83E1CB4115200C806FE /* Menu.swift in Headers */,
......@@ -943,7 +943,7 @@
96BCB7B61CB40DC500C806FE /* MaterialAnimation.swift in Sources */,
96BCB7A71CB40DC500C806FE /* ControlView.swift in Sources */,
96BCB7DB1CB40DC500C806FE /* NavigationItem.swift in Sources */,
96BCB7E01CB40DC500C806FE /* SideNavigationController.swift in Sources */,
96BCB7E01CB40DC500C806FE /* NavigationDrawerController.swift in Sources */,
96BCB7AD1CB40DC500C806FE /* Material+String.swift in Sources */,
96BCB7A51CB40DC500C806FE /* CaptureView.swift in Sources */,
96BCB7B01CB40DC500C806FE /* Material+UIImage+Color.swift in Sources */,
......
......@@ -41,7 +41,7 @@ public class Layout {
An initializer that takes in a parent context.
- Parameter parent: An optional parent UIView.
*/
init(parent: UIView?) {
public init(parent: UIView?) {
self.parent = parent
}
......@@ -50,7 +50,7 @@ public class Layout {
- Parameter parent: An optional parent UIView.
- Parameter child: An optional child UIView.
*/
init(parent: UIView?, child: UIView?) {
public init(parent: UIView?, child: UIView?) {
self.parent = parent
self.child = child
}
......@@ -61,7 +61,7 @@ public class Layout {
caused the issue.
- Returns: The current Layout instance.
*/
public func debugParentNotAvailableMessage(function: String = #function) -> Layout {
internal func debugParentNotAvailableMessage(function: String = #function) -> Layout {
debugPrint("[Material Layout Error: Parent view context is not available for \(function).")
return self
}
......@@ -72,7 +72,7 @@ public class Layout {
caused the issue.
- Returns: The current Layout instance.
*/
public func debugChildNotAvailableMessage(function: String = #function) -> Layout {
internal func debugChildNotAvailableMessage(function: String = #function) -> Layout {
debugPrint("[Material Layout Error: Chld view context is not available for \(function).")
return self
}
......
......@@ -66,7 +66,7 @@ public class NavigationController : UINavigationController, UIGestureRecognizerD
public override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
if let v: UIGestureRecognizer = interactivePopGestureRecognizer {
if let x: SideNavigationController = sideNavigationController {
if let x: NavigationDrawerController = navigationDrawerController {
if let l: UIPanGestureRecognizer = x.leftPanGesture {
l.requireGestureRecognizerToFail(v)
}
......@@ -89,7 +89,7 @@ public class NavigationController : UINavigationController, UIGestureRecognizerD
/**
Detects the gesture recognizer being used. This is necessary when using
SideNavigationController. It eliminates the conflict in panning.
NavigationDrawerController. It eliminates the conflict in panning.
- Parameter gestureRecognizer: A UIGestureRecognizer to detect.
- Parameter touch: The UITouch event.
- Returns: A Boolean of whether to continue the gesture or not, true yes, false no.
......
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