Compare commits

..

1 Commits

Author SHA1 Message Date
jonkykong 8c0ef63ee1 Updated .swift-version. 2018-09-25 11:17:37 -07:00
6 changed files with 13 additions and 22 deletions
+1
View File
@@ -0,0 +1 @@
4.2
-3
View File
@@ -133,9 +133,6 @@ open class SideMenuManager: NSObject {
/// Forces menus to always animate when appearing or disappearing, regardless of a pushed view controller's animation.
open var menuAlwaysAnimate = false
/// Automatically dismisses the menu when app goes to the background.
open var menuDismissWhenBackgrounded = true
/// Default instance of SideMenuManager.
public static let `default` = SideMenuManager()
+4 -8
View File
@@ -363,20 +363,16 @@ open class SideMenuTransition: UIPercentDrivenInteractiveTransition {
return
}
if let originalSuperview = originalSuperview,
let mainViewController = mainViewController,
sideMenuManager.menuDismissWhenBackgrounded {
if let originalSuperview = originalSuperview, let mainViewController = mainViewController {
originalSuperview.addSubview(mainViewController.view)
}
if notification.name == UIApplication.didEnterBackgroundNotification {
if sideMenuManager.menuDismissWhenBackgrounded {
hideMenuStart().hideMenuComplete()
menuViewController?.dismiss(animated: false, completion: nil)
}
hideMenuStart().hideMenuComplete()
menuViewController?.dismiss(animated: false, completion: nil)
return
}
UIView.animate(withDuration: sideMenuManager.menuAnimationDismissDuration,
delay: 0,
usingSpringWithDamping: sideMenuManager.menuAnimationUsingSpringWithDamping,
+4 -8
View File
@@ -13,7 +13,7 @@
> Hi, I'm Jon Kent and I am an iOS designer, developer, and mobile strategist. I love coffee and play the drums.
> * [**Hire me**](mailto:yo@massappeal.co?subject=Let's%20build%20something%20amazing) to help you make cool stuff. *Note: If you're having a problem with SideMenu, please open an [issue](https://github.com/jonkykong/SideMenu/issues/new) and do not email me.*
> * Check out my [website](http://massappeal.co) to see some of my other projects.
> * Building and maintaining this **free** library takes a lot of my time and **saves you time**. Please consider paying it forward by supporting me with a small amount to my [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=contact%40jonkent%2eme&lc=US&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted). (only **4** people have donated since 12/23/15 😕 but **thank you** to those who have!)
> * Building and maintaining this **free** library takes a lot of my time and **saves you time**. Please consider paying it forward by supporting me with a small amount to my [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=contact%40jonkent%2eme&lc=US&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted). (only **4** people have donated since inception 😕 but **thank you** to those who have!)
* **[Overview](#overview)**
* [Preview Samples](#preview-samples)
@@ -137,20 +137,16 @@ let menuRightNavigationController = UISideMenuNavigationController(rootViewContr
// let menuRightNavigationController = storyboard!.instantiateViewController(withIdentifier: "RightMenuNavigationController") as! UISideMenuNavigationController
SideMenuManager.default.menuRightNavigationController = menuRightNavigationController
// (Optional) Enable gestures. The left and/or right menus must be set up above for these to work.
// 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!
SideMenuManager.default.menuAddPanGestureToPresent(toView: self.navigationController!.navigationBar)
SideMenuManager.default.menuAddScreenEdgePanGesturesToPresent(toView: self.navigationController!.view)
// (Optional) Prevent status bar area from turning black when menu appears:
SideMenuManager.default.menuFadeStatusBar = false
```
Then from a button, do something like this:
``` swift
present(SideMenuManager.default.menuLeftNavigationController!, animated: true, completion: nil)
```
To dismiss a menu programmatically, do something like this:
``` swift
// Similarly, to dismiss a menu programmatically, you would do this:
dismiss(animated: true, completion: nil)
```
That's it.
+2 -3
View File
@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = "SideMenu"
s.version = "5.0.2"
s.version = "5.0.1"
s.summary = "Simple side menu control for iOS in Swift inspired by Facebook. Right and Left sides. No coding required."
# This description is used to generate tags and improve search results.
@@ -28,8 +28,7 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/jonkykong/SideMenu.git", :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.ios.deployment_target = '10.0'
s.swift_version = '4.2'
s.ios.deployment_target = '8.0'
s.source_files = 'Pod/Classes/**/*'
# s.resource_bundles = {
+2
View File
@@ -524,6 +524,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = SideMenu/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = "$(SRCROOT)/SideMenu/module.modulemap";
PRODUCT_BUNDLE_IDENTIFIER = com.jonkykong.SideMenu;
@@ -545,6 +546,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = SideMenu/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = "$(SRCROOT)/SideMenu/module.modulemap";
PRODUCT_BUNDLE_IDENTIFIER = com.jonkykong.SideMenu;