Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7541ac0ef7 | |||
| 448faae85c | |||
| 3b2e3454cf | |||
| 4926721a42 | |||
| d51a826581 | |||
| 2e5680bdea | |||
| d37a30348d | |||
| 3d53679a94 |
@@ -1,5 +1,5 @@
|
||||
PODS:
|
||||
- SideMenu (0.1.6)
|
||||
- SideMenu (1.0.2)
|
||||
|
||||
DEPENDENCIES:
|
||||
- SideMenu (from `../`)
|
||||
@@ -9,6 +9,6 @@ EXTERNAL SOURCES:
|
||||
:path: ../
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
SideMenu: 102bdf48ac5228b1a4a68bdd0b10232adbdbfdb0
|
||||
SideMenu: 190288fb750f9a2ca53bdd017374e520843f612f
|
||||
|
||||
COCOAPODS: 0.39.0
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "SideMenu",
|
||||
"version": "0.1.6",
|
||||
"version": "1.0.2",
|
||||
"summary": "Simple side menu control in Swift inspired by Facebook. Right and Left sides. No coding required.",
|
||||
"description": "SideMenu is a simple and versatile side menu control. It's highly customizable, but can also be implemented in storyboard without a single line of code. The are three standard animation styles to choose from along with several other options for further customization if desired. Just type SideMenuManager.menu... and code completion will show you everything you can customize.",
|
||||
"homepage": "https://github.com/jonkykong/SideMenu",
|
||||
@@ -11,7 +11,7 @@
|
||||
},
|
||||
"source": {
|
||||
"git": "https://github.com/jonkykong/SideMenu.git",
|
||||
"tag": "0.1.6"
|
||||
"tag": "1.0.2"
|
||||
},
|
||||
"platforms": {
|
||||
"ios": "8.0"
|
||||
|
||||
Generated
+2
-2
@@ -1,5 +1,5 @@
|
||||
PODS:
|
||||
- SideMenu (0.1.6)
|
||||
- SideMenu (1.0.2)
|
||||
|
||||
DEPENDENCIES:
|
||||
- SideMenu (from `../`)
|
||||
@@ -9,6 +9,6 @@ EXTERNAL SOURCES:
|
||||
:path: ../
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
SideMenu: 102bdf48ac5228b1a4a68bdd0b10232adbdbfdb0
|
||||
SideMenu: 190288fb750f9a2ca53bdd017374e520843f612f
|
||||
|
||||
COCOAPODS: 0.39.0
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.1.6</string>
|
||||
<string>1.0.2</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
||||
@@ -492,6 +492,7 @@
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -506,6 +507,7 @@
|
||||
MODULE_NAME = ExampleApp;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
||||
@@ -135,6 +135,8 @@ internal class SideMenuTransition: UIPercentDrivenInteractiveTransition, UIViewC
|
||||
}
|
||||
|
||||
internal class func hideMenuStart() {
|
||||
NSNotificationCenter.defaultCenter().removeObserver(SideMenuTransition.singleton)
|
||||
|
||||
let mainViewController = SideMenuTransition.viewControllerForPresentedMenu!
|
||||
let menuView = SideMenuTransition.presentDirection == .Left ? SideMenuManager.menuLeftNavigationController!.view : SideMenuManager.menuRightNavigationController!.view
|
||||
menuView.transform = CGAffineTransformIdentity
|
||||
@@ -174,7 +176,6 @@ internal class SideMenuTransition: UIPercentDrivenInteractiveTransition, UIViewC
|
||||
mainViewController.view.motionEffects.removeAll()
|
||||
mainViewController.view.layer.shadowOpacity = 0
|
||||
menuView.layer.shadowOpacity = 0
|
||||
NSNotificationCenter.defaultCenter().removeObserver(self)
|
||||
if let topNavigationController = mainViewController as? UINavigationController {
|
||||
topNavigationController.interactivePopGestureRecognizer!.enabled = true
|
||||
}
|
||||
@@ -217,6 +218,8 @@ internal class SideMenuTransition: UIPercentDrivenInteractiveTransition, UIViewC
|
||||
}
|
||||
|
||||
internal class func presentMenuComplete() {
|
||||
NSNotificationCenter.defaultCenter().addObserver(SideMenuTransition.singleton, selector:"applicationDidEnterBackgroundNotification", name: UIApplicationDidEnterBackgroundNotification, object: nil)
|
||||
|
||||
let mainViewController = SideMenuTransition.viewControllerForPresentedMenu!
|
||||
switch SideMenuManager.menuPresentMode {
|
||||
case .MenuSlideIn, .MenuDissolveIn:
|
||||
@@ -303,9 +306,6 @@ internal class SideMenuTransition: UIPercentDrivenInteractiveTransition, UIViewC
|
||||
}
|
||||
|
||||
SideMenuTransition.hideMenuStart() // offstage for interactive
|
||||
|
||||
NSNotificationCenter.defaultCenter().removeObserver(self)
|
||||
NSNotificationCenter.defaultCenter().addObserver(SideMenuTransition.singleton, selector:"applicationDidEnterBackgroundNotification", name: UIApplicationDidEnterBackgroundNotification, object: nil)
|
||||
}
|
||||
|
||||
// perform the animation!
|
||||
@@ -326,6 +326,8 @@ internal class SideMenuTransition: UIPercentDrivenInteractiveTransition, UIViewC
|
||||
if transitionContext.transitionWasCancelled() {
|
||||
if self.presenting {
|
||||
SideMenuTransition.hideMenuComplete()
|
||||
} else {
|
||||
SideMenuTransition.presentMenuComplete()
|
||||
}
|
||||
transitionContext.completeTransition(false)
|
||||
} else {
|
||||
|
||||
@@ -32,6 +32,9 @@ public class UITableViewVibrantCell: UITableViewCell {
|
||||
override public func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
|
||||
// shouldn't be needed but backgroundColor is set to white on iPad:
|
||||
backgroundColor = UIColor.clearColor()
|
||||
|
||||
if !UIAccessibilityIsReduceTransparencyEnabled() && SideMenuManager.menuBlurEffectStyle != nil {
|
||||
let blurEffect = UIBlurEffect(style: SideMenuManager.menuBlurEffectStyle!)
|
||||
vibrancyView.effect = UIVibrancyEffect(forBlurEffect: blurEffect)
|
||||
|
||||
@@ -12,7 +12,7 @@ SideMenu is a simple and versatile side menu control written in Swift.
|
||||
- [x] Supports continuous swiping between each side menu in a single gesture.
|
||||
- [x] Menus can be presented and dismissed the same as any other View Controller since this control uses custom transitions.
|
||||
|
||||
Check out the example project or this [interactive demo](https://appetize.io/app/42d6b8teuaej2wcday76jqwrcc) to see it in action!
|
||||
Check out the example project or this [interactive demo](https://appetize.io/app/5y7n2bk8f6jz58h92871udem54) to see it in action!
|
||||
|
||||

|
||||
|
||||
@@ -66,13 +66,14 @@ import SideMenu
|
||||
In your View Controller's `viewDidLoad` event, do something like this:
|
||||
``` swift
|
||||
// Define the menus
|
||||
let leftMenuNavigationController = UIMenuNavigationController()
|
||||
leftMenuNavigationController.leftSide = true
|
||||
// UIMenuNavigationController is a subclass of UINavigationController, so do any additional configuration of it here like setting its viewControllers.
|
||||
SideMenuManager.menuLeftNavigationController = leftMenuNavigationController
|
||||
let rightMenuNavigationController = UIMenuNavigationController()
|
||||
// UIMenuNavigationController is a subclass of UINavigationController, so do any additional configuration of it here like setting its viewControllers.
|
||||
SideMenuManager.menuRightNavigationController = rightMenuNavigationController
|
||||
let menuLeftNavigationController = UISideMenuNavigationController()
|
||||
menuLeftNavigationController.leftSide = true
|
||||
// UISideMenuNavigationController is a subclass of UINavigationController, so do any additional configuration of it here like setting its viewControllers.
|
||||
SideMenuManager.menuLeftNavigationController = menuLeftNavigationController
|
||||
|
||||
let menuRightNavigationController = UISideMenuNavigationController()
|
||||
// UISideMenuNavigationController is a subclass of UINavigationController, so do any additional configuration of it here like setting its viewControllers.
|
||||
SideMenuManager.menuRightNavigationController = menuRightNavigationController
|
||||
|
||||
// Enable gestures. The left and/or right menus must be set up above for these to work.
|
||||
// Note that these continue to work on the Navigation Controller independent of the View Controller it displays!
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "SideMenu"
|
||||
s.version = "0.1.6"
|
||||
s.version = "1.0.2"
|
||||
s.summary = "Simple side menu control in Swift inspired by Facebook. Right and Left sides. No coding required."
|
||||
|
||||
# This description is used to generate tags and improve search results.
|
||||
|
||||
Reference in New Issue
Block a user