Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 14ddcaa1cb | |||
| e94153ce25 | |||
| b9a5ed0886 | |||
| b2c8bedaca | |||
| e94de73713 | |||
| b43f4d14f3 |
@@ -41,7 +41,7 @@ internal protocol MenuModel: TransitionModel {
|
||||
- replace: Any existing view controllers are released from the stack and replaced with the pushed view controller. Back buttons are automatically hidden. This behavior is ideal if view controllers require a lot of memory or their state doesn't need to be preserved..
|
||||
- subMenu: Unlike all other behaviors that push using the menu's presentingViewController, this behavior pushes view controllers within the menu. Use this behavior if you want to display a sub menu.
|
||||
*/
|
||||
var pushStyle: MenuPushStyle { get }
|
||||
var pushStyle: SideMenuPushStyle { get }
|
||||
}
|
||||
|
||||
internal protocol TransitionModel: PresentationModel {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
@objc public enum MenuPushStyle: Int { case
|
||||
@objc public enum SideMenuPushStyle: Int { case
|
||||
`default`,
|
||||
popWhenPossible,
|
||||
preserve,
|
||||
@@ -50,7 +50,7 @@ public struct SideMenuSettings: MenuModel {
|
||||
public var presentingViewControllerUseSnapshot: Bool = false
|
||||
public var presentDuration: Double = 0.35
|
||||
public var presentationStyle: SideMenuPresentationStyle = .viewSlideOut
|
||||
public var pushStyle: MenuPushStyle = .default
|
||||
public var pushStyle: SideMenuPushStyle = .default
|
||||
public var statusBarEndAlpha: CGFloat = 1
|
||||
public var usingSpringWithDamping: CGFloat = 1
|
||||
|
||||
@@ -110,25 +110,16 @@ open class UISideMenuNavigationController: UINavigationController {
|
||||
}
|
||||
}
|
||||
|
||||
#if !STFU_SIDEMENU
|
||||
// This override prevents newbie developers from creating black/blank menus and opening newbie issues.
|
||||
// If you would like to remove this override, define STFU_SIDEMENU in the Active Compilation Conditions of your .plist file.
|
||||
// Sorry for the inconvenience experienced developers :(
|
||||
@available(*, unavailable, renamed: "init(rootViewController:)")
|
||||
init() {
|
||||
fatalError("init is not available")
|
||||
public override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
|
||||
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
public init(_ block: (UISideMenuNavigationController) -> Void) {
|
||||
public convenience init(_ block: (UISideMenuNavigationController) -> Void) {
|
||||
self.init()
|
||||
block(self)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
public init(rootViewController: UIViewController, settings: SideMenuSettings) {
|
||||
public init(rootViewController: UIViewController, settings: SideMenuSettings = SideMenuSettings()) {
|
||||
super.init(rootViewController: rootViewController)
|
||||
self.settings = settings
|
||||
}
|
||||
@@ -362,7 +353,7 @@ extension UISideMenuNavigationController: MenuModel {
|
||||
set { settings.presentationStyle = newValue }
|
||||
}
|
||||
|
||||
@IBInspectable open var pushStyle: MenuPushStyle {
|
||||
@IBInspectable open var pushStyle: SideMenuPushStyle {
|
||||
get { return settings.pushStyle }
|
||||
set { settings.pushStyle = newValue }
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
[](http://cocoapods.org/pods/SideMenu)
|
||||
|
||||
### If you like SideMenu, give it a ★ at the top right of this page.
|
||||
#### Using SideMenu in your app? [Send](mailto:yo@massappeal.co?subject=SideMenu%20in%20action!) me a link to your app in the app store!
|
||||
#### SideMenu needs your help! If you're a skilled iOS developer and want to help maintain this repository and answer issues asked by the community, please [send me an email](mailto:yo@massappeal.co?subject=I%20Want%20To%20Help!).
|
||||
|
||||
> 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.*
|
||||
@@ -72,10 +72,10 @@ use_frameworks!
|
||||
pod 'SideMenu'
|
||||
|
||||
# For Swift 5 use:
|
||||
# pod 'SideMenu', '~> 5.0.0'
|
||||
# pod 'SideMenu', '~> 6.0.0'
|
||||
|
||||
# For Swift 4 (no longer maintained) use:
|
||||
# pod 'SideMenu', '~> 4.0.0'
|
||||
# For Swift 4.2 (no longer maintained) use:
|
||||
# pod 'SideMenu', '~> 5.0.0'
|
||||
```
|
||||
|
||||
Then, run the following command:
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "SideMenu"
|
||||
s.version = "6.0.0"
|
||||
s.version = "6.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.
|
||||
|
||||
Reference in New Issue
Block a user