Compare commits

...

8 Commits

Author SHA1 Message Date
jonkykong 7541ac0ef7 Fix for rare crash when app is backgrounded. 2016-01-21 21:11:46 -08:00
jonkykong 448faae85c Updated README.md for GitHub. 2016-01-15 11:49:50 -08:00
jonkykong 3b2e3454cf Updated README.md specifically for pods. 2016-01-15 11:46:27 -08:00
Jon Kent 4926721a42 Update README.md 2016-01-15 11:36:01 -08:00
jonkykong d51a826581 Updated example project to support iPad. 2016-01-15 11:27:46 -08:00
Jon Kent 2e5680bdea Update README.md 2016-01-15 11:21:17 -08:00
Jon Kent d37a30348d Update README.md 2016-01-15 11:16:44 -08:00
Jon Kent 3d53679a94 Update README.md 2016-01-14 20:37:13 -08:00
9 changed files with 28 additions and 20 deletions
+2 -2
View File
@@ -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
View File
@@ -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"
+2 -2
View File
@@ -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
View File
@@ -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;
};
+6 -4
View File
@@ -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 {
+3
View File
@@ -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)
+9 -8
View File
@@ -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!
![](etc/Preview.gif)
@@ -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
View File
@@ -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.