Compare commits

...

16 Commits

Author SHA1 Message Date
jonkykong 0d7cca5609 Update README for Cocoapods 2018-10-16 01:26:49 -07:00
jonkykong 9dcfc25b48 Remove swift version file. 2018-10-16 01:24:59 -07:00
jonkykong 017e97db18 Update podspec version. 2018-10-16 01:22:12 -07:00
jonkykong fbcee66c14 Merge branch 'pr/412' into 5.0.2
* pr/412:
  Refactor
  fix: makes dismissWhenInBackground to be computed property of SideMenuManager
  Adds mainViewController.view to originalSuperview only if dismissWhenInBackground is true
  Prevents fadeout transition if 'dismissWhenInBackground' is set to false
  Adds ability to toggle automatic dismissal of the menu when app goes to the background
2018-10-16 01:17:02 -07:00
jonkykong ad47e8bff1 Refactor 2018-10-16 01:13:38 -07:00
jonkykong b4042a562d Update podspec 2018-10-16 00:46:12 -07:00
Igor Kravchenko c7c6fdf64a fix: makes dismissWhenInBackground to be computed property of SideMenuManager 2018-10-10 17:46:42 +03:00
Igor Kravchenko 02595f2b68 Adds mainViewController.view to originalSuperview only if dismissWhenInBackground is true 2018-10-10 15:16:03 +03:00
Igor Kravchenko a8f0d75e66 Prevents fadeout transition if 'dismissWhenInBackground' is set to false 2018-10-10 13:23:22 +03:00
Igor Kravchenko fbe29c7756 Adds ability to toggle automatic dismissal of the menu when app goes to the background 2018-10-10 12:59:25 +03:00
Jon Kent 61f1556d93 Update README.md 2018-10-09 17:40:34 -07:00
Jon Kent ceb3e44c31 Update README.md 2018-09-26 13:31:17 -07:00
Jon Kent 01987a9d5b Update README.md 2018-09-25 11:29:46 -07:00
jonkykong b1e83dc4a8 Update README for Github. 2018-09-25 11:22:36 -07:00
jonkykong 89d3048c09 Merge tag '5.0.1'
* tag '5.0.1':
  Updated podspec.
  Update README for Cocoapods.
  Fixes to fully upgrade to Swift 4.2 as it appears to have been incomplete.
2018-09-25 11:21:51 -07:00
jonkykong ddca756462 Updated podspec. 2018-09-25 11:18:53 -07:00
6 changed files with 22 additions and 13 deletions
-1
View File
@@ -1 +0,0 @@
3.0
+3
View File
@@ -133,6 +133,9 @@ 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()
+8 -4
View File
@@ -363,16 +363,20 @@ open class SideMenuTransition: UIPercentDrivenInteractiveTransition {
return
}
if let originalSuperview = originalSuperview, let mainViewController = mainViewController {
if let originalSuperview = originalSuperview,
let mainViewController = mainViewController,
sideMenuManager.menuDismissWhenBackgrounded {
originalSuperview.addSubview(mainViewController.view)
}
if notification.name == UIApplication.didEnterBackgroundNotification {
hideMenuStart().hideMenuComplete()
menuViewController?.dismiss(animated: false, completion: nil)
if sideMenuManager.menuDismissWhenBackgrounded {
hideMenuStart().hideMenuComplete()
menuViewController?.dismiss(animated: false, completion: nil)
}
return
}
UIView.animate(withDuration: sideMenuManager.menuAnimationDismissDuration,
delay: 0,
usingSpringWithDamping: sideMenuManager.menuAnimationUsingSpringWithDamping,
+8 -4
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 inception 😕 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 12/23/15 😕 but **thank you** to those who have!)
* **[Overview](#overview)**
* [Preview Samples](#preview-samples)
@@ -137,16 +137,20 @@ let menuRightNavigationController = UISideMenuNavigationController(rootViewContr
// let menuRightNavigationController = storyboard!.instantiateViewController(withIdentifier: "RightMenuNavigationController") as! UISideMenuNavigationController
SideMenuManager.default.menuRightNavigationController = menuRightNavigationController
// Enable gestures. The left and/or right menus must be set up above for these to work.
// (Optional) 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)
// Similarly, to dismiss a menu programmatically, you would do this:
```
To dismiss a menu programmatically, do something like this:
``` swift
dismiss(animated: true, completion: nil)
```
That's it.
+3 -2
View File
@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = "SideMenu"
s.version = "5.0.1"
s.version = "5.0.2"
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,7 +28,8 @@ 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 = '8.0'
s.ios.deployment_target = '10.0'
s.swift_version = '4.2'
s.source_files = 'Pod/Classes/**/*'
# s.resource_bundles = {
-2
View File
@@ -524,7 +524,6 @@
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;
@@ -546,7 +545,6 @@
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;