Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2e684440fc | |||
| 6064d6d5fc | |||
| d13ed0ea9b | |||
| ef607b3ab2 | |||
| 069b974145 | |||
| 3e452b2a69 | |||
| 021fe8cd6a | |||
| fd6ecbbece | |||
| 313cda5d69 | |||
| e35a46b075 | |||
| 3702ecb770 | |||
| 893818b582 | |||
| f21ed8965d | |||
| db1cf2a6b6 |
@@ -7,7 +7,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
public protocol UISideMenuNavigationControllerDelegate: class {
|
||||
@objc public protocol UISideMenuNavigationControllerDelegate: class {
|
||||
func sideMenuWillAppear(menu: UISideMenuNavigationController, animated: Bool)
|
||||
func sideMenuDidAppear(menu: UISideMenuNavigationController, animated: Bool)
|
||||
func sideMenuWillDisappear(menu: UISideMenuNavigationController, animated: Bool)
|
||||
@@ -56,6 +56,8 @@ open class UISideMenuNavigationController: UINavigationController {
|
||||
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.
|
||||
weak var sideMenuDelegate: UISideMenuNavigationControllerDelegate?
|
||||
|
||||
/// SideMenuManager instance associated with this menu. Default is `SideMenuManager.default`. This property cannot be changed after the menu has loaded.
|
||||
@@ -104,6 +106,14 @@ open class UISideMenuNavigationController: UINavigationController {
|
||||
fatalError("init is not available")
|
||||
}
|
||||
|
||||
public override init(rootViewController: UIViewController) {
|
||||
super.init(rootViewController: rootViewController)
|
||||
}
|
||||
|
||||
public override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
}
|
||||
|
||||
public required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
}
|
||||
|
||||
@@ -224,8 +224,8 @@ of the view controller being presented in storyboard or during its initalization
|
||||
*/
|
||||
open var menuDismissOnPush = true
|
||||
|
||||
/// Uses the menu dismiss animation even if pushing a view is not animated itself.
|
||||
open var menuAnimateDismissOnNonAnimatedPush = false
|
||||
/// Forces menus to always animate when appearing or disappearing, regardless of a pushed view controller's animation.
|
||||
open var menuAlwaysAnimate = false
|
||||
|
||||
/**
|
||||
The blur effect style of the menu if the menu's root view controller is a UITableViewController or UICollectionViewController.
|
||||
@@ -297,7 +297,7 @@ extension MyViewController: UISideMenuNavigationControllerDelegate {
|
||||
|
||||
}
|
||||
```
|
||||
*Note: there is no `delegate` property to set on the `UISideMenuNavigationController` for this to work. If your view controller adheres to the protocol then the methods will be called automatically.*
|
||||
*Note: setting the `sideMenuDelegate` property on `UISideMenuNavigationController` is optional. If your view controller adheres to the protocol then the methods will be called automatically.*
|
||||
### Advanced
|
||||
For simplicity, `SideMenuManager.default` serves as the primary instance as most projects will only need one menu across all screens. If you need to show a different SideMenu, such as from a modal view controller presented from a previous SideMenu, do the following:
|
||||
1. Declare a variable containing your custom `SideMenuManager` instance. You may want it to define it globally and configure it in your app delegate if menus will be used on multiple screens.
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "SideMenu"
|
||||
s.version = "3.1.2"
|
||||
s.version = "3.1.4"
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user