Compare commits

..

1 Commits

Author SHA1 Message Date
jonkykong 365b01864f README adjustment. 2018-05-23 18:44:05 -07:00
11 changed files with 502 additions and 71 deletions
+1 -1
View File
@@ -1 +1 @@
4.2
3.0
+2 -2
View File
@@ -42,7 +42,7 @@ class MainViewController: UIViewController {
let modes:[SideMenuManager.MenuPresentMode] = [.menuSlideIn, .viewSlideOut, .menuDissolveIn]
presentModeSegmentedControl.selectedSegmentIndex = modes.index(of: SideMenuManager.default.menuPresentMode)!
let styles:[UIBlurEffect.Style] = [.dark, .light, .extraLight]
let styles:[UIBlurEffectStyle] = [.dark, .light, .extraLight]
if let menuBlurEffectStyle = SideMenuManager.default.menuBlurEffectStyle {
blurSegmentControl.selectedSegmentIndex = styles.index(of: menuBlurEffectStyle) ?? 0
} else {
@@ -65,7 +65,7 @@ class MainViewController: UIViewController {
if segmentControl.selectedSegmentIndex == 0 {
SideMenuManager.default.menuBlurEffectStyle = nil
} else {
let styles:[UIBlurEffect.Style] = [.dark, .light, .extraLight]
let styles:[UIBlurEffectStyle] = [.dark, .light, .extraLight]
SideMenuManager.default.menuBlurEffectStyle = styles[segmentControl.selectedSegmentIndex - 1]
}
default: break;
+293 -11
View File
@@ -17,9 +17,9 @@
*/
@objcMembers
open class SideMenuManager: NSObject {
open class SideMenuManager : NSObject {
@objc public enum MenuPushStyle: Int {
@objc public enum MenuPushStyle : Int {
case defaultBehavior,
popWhenPossible,
replace,
@@ -28,7 +28,7 @@ open class SideMenuManager: NSObject {
subMenu
}
@objc public enum MenuPresentMode: Int {
@objc public enum MenuPresentMode : Int {
case menuSlideIn,
viewSlideOut,
viewSlideInOut,
@@ -112,10 +112,7 @@ open class SideMenuManager: NSObject {
open var menuFadeStatusBar = true
/// The animation options when a menu is displayed. Ignored when displayed with a gesture.
open var menuAnimationOptions: UIView.AnimationOptions = .curveEaseInOut
/// Animation curve of the remaining animation when the menu is partially dismissed with gestures. Default is .easeIn.
open var menuAnimationCompletionCurve: UIView.AnimationCurve = .easeIn
open var menuAnimationOptions: UIViewAnimationOptions = .curveEaseInOut
/// The animation spring damping when a menu is displayed. Ignored when displayed with a gesture.
open var menuAnimationUsingSpringWithDamping: CGFloat = 1
@@ -135,11 +132,13 @@ open class SideMenuManager: NSObject {
open var menuAlwaysAnimate = false
/// Default instance of SideMenuManager.
public static let `default` = SideMenuManager()
open static let `default` = SideMenuManager()
/// Default instance of SideMenuManager (objective-C).
open class var defaultManager: SideMenuManager {
return SideMenuManager.default
get {
return SideMenuManager.default
}
}
internal var transition: SideMenuTransition!
@@ -154,7 +153,7 @@ open class SideMenuManager: NSObject {
- Note: If you want cells in a UITableViewController menu to show vibrancy, make them a subclass of UITableViewVibrantCell.
*/
open var menuBlurEffectStyle: UIBlurEffect.Style? {
open var menuBlurEffectStyle: UIBlurEffectStyle? {
didSet {
if oldValue != menuBlurEffectStyle {
updateMenuBlurIfNecessary()
@@ -294,7 +293,7 @@ open class SideMenuManager: NSObject {
guard let forMenu = forMenu,
let menuBlurEffectStyle = menuBlurEffectStyle,
let view = forMenu.topViewController?.view,
!UIAccessibility.isReduceTransparencyEnabled else {
!UIAccessibilityIsReduceTransparencyEnabled() else {
return
}
@@ -400,3 +399,286 @@ open class SideMenuManager: NSObject {
return panGestureRecognizer
}
}
// Deprecations, to be removed at a future date.
extension SideMenuManager {
@available(*, deprecated, renamed: "default.menuPushStyle", message: "SideMenuManager class methods deprecated.")
open static var menuPushStyle: MenuPushStyle {
get {
return `default`.menuPushStyle
}
set {
`default`.menuPushStyle = newValue
}
}
@available(*, deprecated, renamed: "default.menuPresentMode", message: "SideMenuManager class methods deprecated.")
open static var menuPresentMode: MenuPresentMode {
get {
return `default`.menuPresentMode
}
set {
`default`.menuPresentMode = newValue
}
}
@available(*, deprecated, renamed: "default.menuAllowPushOfSameClassTwice", message: "SideMenuManager class methods deprecated.")
open static var menuAllowPushOfSameClassTwice: Bool {
get {
return `default`.menuAllowPushOfSameClassTwice
}
set {
`default`.menuAllowPushOfSameClassTwice = newValue
}
}
@available(*, deprecated, renamed: "default.menuWidth", message: "SideMenuManager class methods deprecated.")
open static var menuWidth: CGFloat {
get {
return `default`.menuWidth
}
set {
`default`.menuWidth = newValue
}
}
@available(*, deprecated, renamed: "default.menuAnimationPresentDuration", message: "SideMenuManager class methods deprecated.")
open static var menuAnimationPresentDuration: Double {
get {
return `default`.menuAnimationPresentDuration
}
set {
`default`.menuAnimationPresentDuration = newValue
}
}
@available(*, deprecated, renamed: "default.menuAnimationDismissDuration", message: "SideMenuManager class methods deprecated.")
open static var menuAnimationDismissDuration: Double {
get {
return `default`.menuAnimationDismissDuration
}
set {
`default`.menuAnimationDismissDuration = newValue
}
}
@available(*, deprecated, renamed: "default.menuAnimationCompleteGestureDuration", message: "SideMenuManager class methods deprecated.")
open static var menuAnimationCompleteGestureDuration: Double {
get {
return `default`.menuAnimationCompleteGestureDuration
}
set {
`default`.menuAnimationCompleteGestureDuration = newValue
}
}
@available(*, deprecated, renamed: "default.menuAnimationFadeStrength", message: "SideMenuManager class methods deprecated.")
open static var menuAnimationFadeStrength: CGFloat {
get {
return `default`.menuAnimationFadeStrength
}
set {
`default`.menuAnimationFadeStrength = newValue
}
}
@available(*, deprecated, renamed: "default.menuAnimationTransformScaleFactor", message: "SideMenuManager class methods deprecated.")
open static var menuAnimationTransformScaleFactor: CGFloat {
get {
return `default`.menuAnimationTransformScaleFactor
}
set {
`default`.menuAnimationTransformScaleFactor = newValue
}
}
@available(*, deprecated, renamed: "default.menuAnimationBackgroundColor", message: "SideMenuManager class methods deprecated.")
open static var menuAnimationBackgroundColor: UIColor? {
get {
return `default`.menuAnimationBackgroundColor
}
set {
`default`.menuAnimationBackgroundColor = newValue
}
}
@available(*, deprecated, renamed: "default.menuShadowOpacity", message: "SideMenuManager class methods deprecated.")
open static var menuShadowOpacity: Float {
get {
return `default`.menuShadowOpacity
}
set {
`default`.menuShadowOpacity = newValue
}
}
@available(*, deprecated, renamed: "default.menuShadowColor", message: "SideMenuManager class methods deprecated.")
open static var menuShadowColor: UIColor {
get {
return `default`.menuShadowColor
}
set {
`default`.menuShadowColor = newValue
}
}
@available(*, deprecated, renamed: "default.menuShadowRadius", message: "SideMenuManager class methods deprecated.")
open static var menuShadowRadius: CGFloat {
get {
return `default`.menuShadowRadius
}
set {
`default`.menuShadowRadius = newValue
}
}
@available(*, deprecated, renamed: "default.menuPresentingViewControllerUserInteractionEnabled", message: "SideMenuManager class methods deprecated.")
open static var menuPresentingViewControllerUserInteractionEnabled: Bool {
get {
return `default`.menuPresentingViewControllerUserInteractionEnabled
}
set {
`default`.menuPresentingViewControllerUserInteractionEnabled = newValue
}
}
@available(*, deprecated, renamed: "default.menuParallaxStrength", message: "SideMenuManager class methods deprecated.")
open static var menuParallaxStrength: Int {
get {
return `default`.menuParallaxStrength
}
set {
`default`.menuParallaxStrength = newValue
}
}
@available(*, deprecated, renamed: "default.menuFadeStatusBar", message: "SideMenuManager class methods deprecated.")
open static var menuFadeStatusBar: Bool {
get {
return `default`.menuFadeStatusBar
}
set {
`default`.menuFadeStatusBar = newValue
}
}
@available(*, deprecated, renamed: "default.menuAnimationOptions", message: "SideMenuManager class methods deprecated.")
open static var menuAnimationOptions: UIViewAnimationOptions {
get {
return `default`.menuAnimationOptions
}
set {
`default`.menuAnimationOptions = newValue
}
}
@available(*, deprecated, renamed: "default.menuAnimationUsingSpringWithDamping", message: "SideMenuManager class methods deprecated.")
open static var menuAnimationUsingSpringWithDamping: CGFloat {
get {
return `default`.menuAnimationUsingSpringWithDamping
}
set {
`default`.menuAnimationUsingSpringWithDamping = newValue
}
}
@available(*, deprecated, renamed: "default.menuAnimationInitialSpringVelocity", message: "SideMenuManager class methods deprecated.")
open static var menuAnimationInitialSpringVelocity: CGFloat {
get {
return `default`.menuAnimationInitialSpringVelocity
}
set {
`default`.menuAnimationInitialSpringVelocity = newValue
}
}
@available(*, deprecated, renamed: "default.menuDismissOnPush", message: "SideMenuManager class methods deprecated.")
open static var menuDismissOnPush: Bool {
get {
return `default`.menuDismissOnPush
}
set {
`default`.menuDismissOnPush = newValue
}
}
/// -Warning: Deprecated. Use `menuPushStyle = .subMenu` instead.
@available(*, deprecated, renamed: "menuPushStyle", message: "Use `menuPushStyle = .subMenu` instead.")
open static var menuAllowSubmenus: Bool {
get {
return menuPushStyle == .subMenu
}
set {
if newValue {
menuPushStyle = .subMenu
}
}
}
/// -Warning: Deprecated. Use `menuPushStyle = .popWhenPossible` instead.
@available(*, deprecated, renamed: "menuPushStyle", message: "Use `menuPushStyle = .popWhenPossible` instead.")
open static var menuAllowPopIfPossible: Bool {
get {
return menuPushStyle == .popWhenPossible
}
set {
if newValue {
menuPushStyle = .popWhenPossible
}
}
}
/// -Warning: Deprecated. Use `menuPushStyle = .replace` instead.
@available(*, deprecated, renamed: "menuPushStyle", message: "Use `menuPushStyle = .replace` instead.")
open static var menuReplaceOnPush: Bool {
get {
return menuPushStyle == .replace
}
set {
if newValue {
menuPushStyle = .replace
}
}
}
@available(*, deprecated, renamed: "default.menuBlurEffectStyle", message: "SideMenuManager class methods deprecated.")
open static var menuBlurEffectStyle: UIBlurEffectStyle? {
get {
return `default`.menuBlurEffectStyle
}
set {
`default`.menuBlurEffectStyle = newValue
}
}
@available(*, deprecated, renamed: "default.menuLeftNavigationController", message: "SideMenuManager class methods deprecated.")
open static var menuLeftNavigationController: UISideMenuNavigationController? {
get {
return `default`.menuLeftNavigationController
}
set {
`default`.menuLeftNavigationController = newValue
}
}
@available(*, deprecated, renamed: "default.menuRightNavigationController", message: "SideMenuManager class methods deprecated.")
open static var menuRightNavigationController: UISideMenuNavigationController? {
get {
return `default`.menuRightNavigationController
}
set {
`default`.menuRightNavigationController = newValue
}
}
@available(*, deprecated, renamed: "default.menuLeftSwipeToDismissGesture", message: "SideMenuManager class methods deprecated.")
open static weak var menuLeftSwipeToDismissGesture: UIPanGestureRecognizer? {
get {
return `default`.menuLeftSwipeToDismissGesture
}
set {
`default`.menuLeftSwipeToDismissGesture = newValue
}
}
@available(*, deprecated, renamed: "default.menuRightSwipeToDismissGesture", message: "SideMenuManager class methods deprecated.")
open static weak var menuRightSwipeToDismissGesture: UIPanGestureRecognizer? {
get {
return `default`.menuRightSwipeToDismissGesture
}
set {
`default`.menuRightSwipeToDismissGesture = newValue
}
}
@available(*, deprecated, renamed: "default.menuEnableSwipeGestures", message: "SideMenuManager class methods deprecated.")
open static var menuEnableSwipeGestures: Bool {
get {
return `default`.menuEnableSwipeGestures
}
set {
`default`.menuEnableSwipeGestures = newValue
}
}
@available(*, deprecated, renamed: "default.menuAddScreenEdgePanGesturesToPresent", message: "SideMenuManager class methods deprecated.")
@discardableResult open class func menuAddScreenEdgePanGesturesToPresent(toView: UIView, forMenu:UIRectEdge? = nil) -> [UIScreenEdgePanGestureRecognizer] {
return `default`.menuAddScreenEdgePanGesturesToPresent(toView: toView, forMenu: forMenu)
}
@available(*, deprecated, renamed: "default.menuAddPanGestureToPresent", message: "SideMenuManager class methods deprecated.")
@discardableResult open class func menuAddPanGestureToPresent(toView: UIView) -> UIPanGestureRecognizer {
return `default`.menuAddPanGestureToPresent(toView: toView)
}
}
+17 -13
View File
@@ -22,16 +22,20 @@ open class SideMenuTransition: UIPercentDrivenInteractiveTransition {
}
}
fileprivate var menuWidth: CGFloat {
let overriddenWidth = menuViewController?.menuWidth ?? 0
if overriddenWidth > CGFloat.ulpOfOne {
return overriddenWidth
get {
let overriddenWidth = menuViewController?.menuWidth ?? 0
if overriddenWidth > CGFloat.ulpOfOne {
return overriddenWidth
}
return sideMenuManager.menuWidth
}
return sideMenuManager.menuWidth
}
internal weak var sideMenuManager: SideMenuManager!
internal weak var mainViewController: UIViewController?
internal weak var menuViewController: UISideMenuNavigationController? {
return presentDirection == .left ? sideMenuManager.menuLeftNavigationController : sideMenuManager.menuRightNavigationController
get {
return presentDirection == .left ? sideMenuManager.menuLeftNavigationController : sideMenuManager.menuRightNavigationController
}
}
internal var presentDirection: UIRectEdge = .left
internal weak var tapView: UIView? {
@@ -63,8 +67,8 @@ open class SideMenuTransition: UIPercentDrivenInteractiveTransition {
required public init(sideMenuManager: SideMenuManager) {
super.init()
NotificationCenter.default.addObserver(self, selector:#selector(handleNotification), name: UIApplication.didEnterBackgroundNotification, object: nil)
NotificationCenter.default.addObserver(self, selector:#selector(handleNotification), name: UIApplication.willChangeStatusBarFrameNotification, object: nil)
NotificationCenter.default.addObserver(self, selector:#selector(handleNotification), name: NSNotification.Name.UIApplicationDidEnterBackground, object: nil)
NotificationCenter.default.addObserver(self, selector:#selector(handleNotification), name: NSNotification.Name.UIApplicationWillChangeStatusBarFrame, object: nil)
self.sideMenuManager = sideMenuManager
}
@@ -73,7 +77,9 @@ open class SideMenuTransition: UIPercentDrivenInteractiveTransition {
}
fileprivate static var visibleViewController: UIViewController? {
return getVisibleViewController(forViewController: UIApplication.shared.keyWindow?.rootViewController)
get {
return getVisibleViewController(forViewController: UIApplication.shared.keyWindow?.rootViewController)
}
}
fileprivate class func getVisibleViewController(forViewController: UIViewController?) -> UIViewController? {
@@ -367,7 +373,7 @@ open class SideMenuTransition: UIPercentDrivenInteractiveTransition {
originalSuperview.addSubview(mainViewController.view)
}
if notification.name == UIApplication.didEnterBackgroundNotification {
if notification.name == NSNotification.Name.UIApplicationDidEnterBackground {
hideMenuStart().hideMenuComplete()
menuViewController?.dismiss(animated: false, completion: nil)
return
@@ -392,9 +398,7 @@ extension SideMenuTransition: UIViewControllerAnimatedTransitioning {
// animate a change from one viewcontroller to another
open func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {
completionCurve = sideMenuManager.menuAnimationCompletionCurve
// get reference to our fromView, toView and the container view that we should perform the transition in
let container = transitionContext.containerView
// prevent any other menu gestures from firing
@@ -488,7 +492,7 @@ extension SideMenuTransition: UIViewControllerAnimatedTransitioning {
self.tapView = tapView
}
if let statusBarView = self.statusBarView {
container.bringSubviewToFront(statusBarView)
container.bringSubview(toFront: statusBarView)
}
return
@@ -19,11 +19,13 @@ open class UISideMenuNavigationController: UINavigationController {
fileprivate weak var foundDelegate: UISideMenuNavigationControllerDelegate?
fileprivate weak var activeDelegate: UISideMenuNavigationControllerDelegate? {
guard !view.isHidden else {
return nil
get {
guard !view.isHidden else {
return nil
}
return sideMenuDelegate ?? foundDelegate ?? findDelegate(forViewController: presentingViewController)
}
return sideMenuDelegate ?? foundDelegate ?? findDelegate(forViewController: presentingViewController)
}
fileprivate func findDelegate(forViewController: UIViewController?) -> UISideMenuNavigationControllerDelegate? {
if let navigationController = forViewController as? UINavigationController {
@@ -43,7 +45,9 @@ open class UISideMenuNavigationController: UINavigationController {
internal var locked = false
internal var originalMenuBackgroundColor: UIColor?
internal var transition: SideMenuTransition {
return sideMenuManager.transition
get {
return sideMenuManager.transition
}
}
/// Delegate for receiving appear and disappear related events. If `nil` the visible view controller that displays a `UISideMenuNavigationController` automatically receives these events.
@@ -81,7 +85,9 @@ open class UISideMenuNavigationController: UINavigationController {
/// Indicates if the menu is anywhere in the view hierarchy, even if covered by another view controller.
open var isHidden: Bool {
return presentingViewController == nil
get {
return self.presentingViewController == nil
}
}
#if !STFU_SIDEMENU
@@ -233,11 +239,11 @@ open class UISideMenuNavigationController: UINavigationController {
return
}
NotificationCenter.default.removeObserver(self.transition, name: UIApplication.willChangeStatusBarFrameNotification, object: nil)
NotificationCenter.default.removeObserver(self.transition, name: NSNotification.Name.UIApplicationWillChangeStatusBarFrame, object: nil)
coordinator.animate(alongsideTransition: { (context) in
self.transition.presentMenuStart()
}) { (context) in
NotificationCenter.default.addObserver(self.transition, selector:#selector(SideMenuTransition.handleNotification), name: UIApplication.willChangeStatusBarFrameNotification, object: nil)
NotificationCenter.default.addObserver(self.transition, selector:#selector(SideMenuTransition.handleNotification), name: NSNotification.Name.UIApplicationWillChangeStatusBarFrame, object: nil)
}
}
+3 -3
View File
@@ -13,14 +13,14 @@ open class UITableViewVibrantCell: UITableViewCell {
fileprivate var vibrancyView:UIVisualEffectView = UIVisualEffectView()
fileprivate var vibrancySelectedBackgroundView:UIVisualEffectView = UIVisualEffectView()
fileprivate var defaultSelectedBackgroundView:UIView?
open var blurEffectStyle: UIBlurEffect.Style? {
open var blurEffectStyle: UIBlurEffectStyle? {
didSet {
updateBlur()
}
}
// For registering with UITableView without subclassing otherwise dequeuing instance of the cell causes an exception
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
public override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
}
@@ -45,7 +45,7 @@ open class UITableViewVibrantCell: UITableViewCell {
// shouldn't be needed but backgroundColor is set to white on iPad:
backgroundColor = UIColor.clear
if let blurEffectStyle = blurEffectStyle, !UIAccessibility.isReduceTransparencyEnabled {
if let blurEffectStyle = blurEffectStyle, !UIAccessibilityIsReduceTransparencyEnabled() {
let blurEffect = UIBlurEffect(style: blurEffectStyle)
vibrancyView.effect = UIVibrancyEffect(blurEffect: blurEffect)
+2 -7
View File
@@ -329,11 +329,6 @@
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0930;
TargetAttributes = {
88B64A039CB85A823B85B2EF1C336387 = {
LastSwiftMigration = 1000;
};
};
};
buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */;
compatibilityVersion = "Xcode 3.2";
@@ -483,7 +478,7 @@
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
@@ -714,7 +709,7 @@
PRODUCT_NAME = SideMenu;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
+4 -11
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 **2** people have donated since inception 😕 but **thank you** to those who have!)
* **[Overview](#overview)**
* [Preview Samples](#preview-samples)
@@ -52,9 +52,8 @@ Check out the example project to see it in action!
| ![](https://raw.githubusercontent.com/jonkykong/SideMenu/master/etc/SlideOut.gif) | ![](https://raw.githubusercontent.com/jonkykong/SideMenu/master/etc/SlideIn.gif) | ![](https://raw.githubusercontent.com/jonkykong/SideMenu/master/etc/Dissolve.gif) | ![](https://raw.githubusercontent.com/jonkykong/SideMenu/master/etc/InOut.gif) |
## Requirements
- [x] Xcode 10.
- [x] Swift 4.2.
- [x] iOS 10 or higher.
- [x] Xcode 9.
- [x] iOS 9 or higher.
## Installation
### CocoaPods
@@ -74,11 +73,8 @@ use_frameworks!
pod 'SideMenu'
# For Swift 4 (no longer maintained), use:
# pod 'SideMenu', '~> 4.0.0'
# For Swift 3 (no longer maintained), use:
# pod 'SideMenu', '~> 2.3.4'
# pod 'SideMenu', '~> 3.1.7'
```
Then, run the following command:
@@ -236,9 +232,6 @@ open var menuFadeStatusBar = true
/// The animation options when a menu is displayed. Ignored when displayed with a gesture.
open var menuAnimationOptions: UIViewAnimationOptions = .curveEaseInOut
/// Animation curve of the remaining animation when the menu is partially dismissed with gestures. Default is .easeIn.
open var menuAnimationCompletionCurve: UIViewAnimationCurve = .easeIn
/// The animation spring damping when a menu is displayed. Ignored when displayed with a gesture.
open var menuAnimationUsingSpringWithDamping: CGFloat = 1
+1 -1
View File
@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = "SideMenu"
s.version = "5.0.1"
s.version = "4.0.0"
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.
+165 -9
View File
@@ -7,9 +7,12 @@
objects = {
/* Begin PBXBuildFile section */
108F6C478E56A4CA081F8E09 /* Pods_Example_ExampleTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52C8DD7BE43A8987854CA726 /* Pods_Example_ExampleTests.framework */; };
456193561EADC00AC505B531 /* Pods_ExampleTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D1435FAD2F735E43F383BE96 /* Pods_ExampleTests.framework */; };
65FF1B3E1DE321D8007B0845 /* SideMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 65FF1B3D1DE321D8007B0845 /* SideMenu.h */; settings = {ATTRIBUTES = (Public, ); }; };
7B48A0D61DCB2487002990A1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B48A0D51DCB2487002990A1 /* AppDelegate.swift */; };
7B48A0DD1DCB2487002990A1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7B48A0DC1DCB2487002990A1 /* Assets.xcassets */; };
7B48A0EB1DCB2487002990A1 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B48A0EA1DCB2487002990A1 /* Tests.swift */; };
7B48A0F61DCB2518002990A1 /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B48A0F31DCB2518002990A1 /* MainViewController.swift */; };
7B48A0F71DCB2518002990A1 /* PresentedViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B48A0F41DCB2518002990A1 /* PresentedViewController.swift */; };
7B48A0F81DCB2518002990A1 /* SideMenuTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B48A0F51DCB2518002990A1 /* SideMenuTableViewController.swift */; };
@@ -25,6 +28,16 @@
ACD6DAED90DE36FEA68CDF38 /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47896ABC5C8830D88945A8D3 /* Pods_Example.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
7B48A0E71DCB2487002990A1 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 7B9DC8FB1DC6E8C1000D4007 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 7B48A0D21DCB2487002990A1;
remoteInfo = Example;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
1F17B9D56ADA958C611FAA83 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = "<group>"; };
281FB58A39C022692CEEBF0D /* Pods-Example-ExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-ExampleTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests.debug.xcconfig"; sourceTree = "<group>"; };
@@ -35,6 +48,7 @@
7B48A0D51DCB2487002990A1 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7B48A0DC1DCB2487002990A1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
7B48A0E11DCB2487002990A1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
7B48A0E61DCB2487002990A1 /* ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
7B48A0EA1DCB2487002990A1 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = "<group>"; };
7B48A0EC1DCB2487002990A1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
7B48A0F31DCB2518002990A1 /* MainViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
@@ -66,6 +80,15 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
7B48A0E31DCB2487002990A1 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
456193561EADC00AC505B531 /* Pods_ExampleTests.framework in Frameworks */,
108F6C478E56A4CA081F8E09 /* Pods_Example_ExampleTests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7B9DC9001DC6E8C1000D4007 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -138,6 +161,7 @@
children = (
7B9DC9041DC6E8C1000D4007 /* SideMenu.framework */,
7B48A0D31DCB2487002990A1 /* Example.app */,
7B48A0E61DCB2487002990A1 /* ExampleTests.xctest */,
);
name = Products;
sourceTree = "<group>";
@@ -209,6 +233,27 @@
productReference = 7B48A0D31DCB2487002990A1 /* Example.app */;
productType = "com.apple.product-type.application";
};
7B48A0E51DCB2487002990A1 /* ExampleTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7B48A0F21DCB2487002990A1 /* Build configuration list for PBXNativeTarget "ExampleTests" */;
buildPhases = (
189AEFF809982E08C107BDD8 /* [CP] Check Pods Manifest.lock */,
7B48A0E21DCB2487002990A1 /* Sources */,
7B48A0E31DCB2487002990A1 /* Frameworks */,
7B48A0E41DCB2487002990A1 /* Resources */,
A5F2AF9B69C815BBA71DAD09 /* [CP] Embed Pods Frameworks */,
3625CA9A4E129791488E06FE /* [CP] Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
7B48A0E81DCB2487002990A1 /* PBXTargetDependency */,
);
name = ExampleTests;
productName = ExampleTests;
productReference = 7B48A0E61DCB2487002990A1 /* ExampleTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
7B9DC9031DC6E8C1000D4007 /* SideMenu */ = {
isa = PBXNativeTarget;
buildConfigurationList = 7B9DC90C1DC6E8C1000D4007 /* Build configuration list for PBXNativeTarget "SideMenu" */;
@@ -239,10 +284,15 @@
TargetAttributes = {
7B48A0D21DCB2487002990A1 = {
CreatedOnToolsVersion = 8.0;
DevelopmentTeam = QTJ767UH3L;
LastSwiftMigration = 0900;
ProvisioningStyle = Automatic;
};
7B48A0E51DCB2487002990A1 = {
CreatedOnToolsVersion = 8.0;
LastSwiftMigration = 0900;
ProvisioningStyle = Automatic;
TestTargetID = 7B48A0D21DCB2487002990A1;
};
7B9DC9031DC6E8C1000D4007 = {
CreatedOnToolsVersion = 8.0;
LastSwiftMigration = 0900;
@@ -265,6 +315,7 @@
targets = (
7B9DC9031DC6E8C1000D4007 /* SideMenu */,
7B48A0D21DCB2487002990A1 /* Example */,
7B48A0E51DCB2487002990A1 /* ExampleTests */,
);
};
/* End PBXProject section */
@@ -280,6 +331,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
7B48A0E41DCB2487002990A1 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
7B9DC9021DC6E8C1000D4007 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@@ -293,6 +351,36 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
189AEFF809982E08C107BDD8 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
3625CA9A4E129791488E06FE /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
558DEC0A930F44C17D50F99B /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -323,6 +411,21 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example/Pods-Example-resources.sh\"\n";
showEnvVarsInLog = 0;
};
A5F2AF9B69C815BBA71DAD09 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
B96CD08B77E6CAC7B3180AE2 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -352,6 +455,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
7B48A0E21DCB2487002990A1 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7B48A0EB1DCB2487002990A1 /* Tests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
7B9DC8FF1DC6E8C1000D4007 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -365,6 +476,14 @@
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
7B48A0E81DCB2487002990A1 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 7B48A0D21DCB2487002990A1 /* Example */;
targetProxy = 7B48A0E71DCB2487002990A1 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
7B48A0ED1DCB2487002990A1 /* Debug */ = {
isa = XCBuildConfiguration;
@@ -376,7 +495,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.jonkykong.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
@@ -390,7 +509,37 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.jonkykong.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 4.0;
};
name = Release;
};
7B48A0EF1DCB2487002990A1 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 281FB58A39C022692CEEBF0D /* Pods-Example-ExampleTests.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
INFOPLIST_FILE = ExampleTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.jonkykong.ExampleTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example";
};
name = Debug;
};
7B48A0F01DCB2487002990A1 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = CAE41BBB5F14E59C1FA0A821 /* Pods-Example-ExampleTests.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
INFOPLIST_FILE = ExampleTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.jonkykong.ExampleTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example";
};
name = Release;
};
@@ -444,13 +593,12 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
@@ -501,11 +649,10 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
@@ -531,7 +678,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
@@ -552,7 +699,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.jonkykong.SideMenu;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 4.0;
};
name = Release;
};
@@ -568,6 +715,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7B48A0F21DCB2487002990A1 /* Build configuration list for PBXNativeTarget "ExampleTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
7B48A0EF1DCB2487002990A1 /* Debug */,
7B48A0F01DCB2487002990A1 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
7B9DC8FE1DC6E8C1000D4007 /* Build configuration list for PBXProject "SideMenu" */ = {
isa = XCConfigurationList;
buildConfigurations = (
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>