Compare commits

..

10 Commits

Author SHA1 Message Date
jonkykong e70f37f7b4 Updates to README and podspec. 2016-05-02 16:46:23 -07:00
jonkykong 21e873cc68 Logic and scope tweak. 2016-05-02 16:41:03 -07:00
Igor Savynskyi d81eb6277d variable marker corrections 2016-05-02 21:06:30 +03:00
Igor Savynskyi 2f6a1b8e6c code impruvements in solving issue with side menu wrong size 2016-05-02 15:23:42 +03:00
Ihor Savynskyi 7d766813fd fixing issue with view sizes for specific multitasking case
when running app with side menu on iPad device in Split View mode - it
takes wrong size for main view controller and side menu table view
controller (it is caused by taking sizes from UIScreen not from
UIApplication)
2016-04-27 16:40:34 +03:00
Jon Kent 78fad19e6f Update README.md 2016-04-23 22:55:54 -07:00
Jon Kent e91b9be969 Update README.md 2016-04-23 22:51:12 -07:00
Jon Kent 02252bc035 Update README.md 2016-04-22 15:00:39 -07:00
Jon Kent 4a658269a6 Merge pull request #15 from jonkykong/1.1.5
Reverse README for github.
2016-04-12 10:48:20 -07:00
jonkykong b5342a1c7c Merge tag '1.1.5'
* tag '1.1.5':
  Updated README and pod spec for cocoa pods.
  Added documentation comments for public methods.
  Animation support for parallax.
2016-04-12 10:46:10 -07:00
4 changed files with 29 additions and 11 deletions
+7 -1
View File
@@ -27,6 +27,12 @@ public class SideMenuManager {
private static var originalLeftMenuBackgroundColor: UIColor?
private static var originalRightMenuBackgroundColor: UIColor?
// Bounds which has been allocated for the app on the whole device screen
internal static var appScreenRect: CGRect {
let appWindowRect = UIApplication.sharedApplication().keyWindow?.bounds ?? UIWindow().bounds
return appWindowRect
}
/**
The presentation mode of the menu.
@@ -46,7 +52,7 @@ public class SideMenuManager {
public static var menuAllowPopIfPossible = false
/// Width of the menu when presented on screen, showing the existing view controller in the remaining space. Default is 75% of the screen width.
public static var menuWidth: CGFloat = max(round(min(UIScreen.mainScreen().bounds.width, UIScreen.mainScreen().bounds.height) * 0.75), 240)
public static var menuWidth: CGFloat = max(round(min((appScreenRect.width), (appScreenRect.height)) * 0.75), 240)
/// Duration of the animation when the menu is presented without gestures. Default is 0.35 seconds.
public static var menuAnimationPresentDuration = 0.35
+1 -1
View File
@@ -204,7 +204,7 @@ internal class SideMenuTransition: UIPercentDrivenInteractiveTransition, UIViewC
originalSuperview?.addSubview(mainViewController.view)
}
internal class func presentMenuStart(forSize size: CGSize = UIScreen.mainScreen().bounds.size) {
internal class func presentMenuStart(forSize size: CGSize = SideMenuManager.appScreenRect.size) {
guard let menuView = SideMenuTransition.presentDirection == .Left ? SideMenuManager.menuLeftNavigationController?.view : SideMenuManager.menuRightNavigationController?.view else {
return
}
+20 -8
View File
@@ -3,15 +3,20 @@
[![License](https://img.shields.io/cocoapods/l/SideMenu.svg?style=flat)](http://cocoapods.org/pods/SideMenu)
[![Platform](https://img.shields.io/cocoapods/p/SideMenu.svg?style=flat)](http://cocoapods.org/pods/SideMenu)
### If you like SideMenu, give it a ★ at the top right of this page.
## Shameless Requests First
**1. ### If you like SideMenu, give it a ★ at the top right of its [GitHub](https://github.com/jonkykong/SideMenu) page.**
**2. I need an invite to Dribbble to share SideMenu. Invite me: https://dribbble.com/jonkykong**
## Overview
SideMenu is a simple and versatile side menu control written in Swift.
- [x] **It can be implemented in storyboard without a single line of [code](#code-less-storyboard-implementation).**
- [x] Four standard animation styles to choose from (even parallax if you want to get weird).
- [x] Highly customizable without needing to write tons of custom code.
- [x] Supports continuous swiping between side menus on boths sides in a single gesture.
- [x] Global menu configuration. Set-up once and be done for all screens.
- [x] Menus can be presented and dismissed the same as any other View Controller since this control uses custom transitions.
* **It can be implemented in storyboard without a single line of [code](#code-less-storyboard-implementation).**
* Four standard animation styles to choose from (even parallax if you want to get weird).
* Highly customizable without needing to write tons of custom code.
* Supports continuous swiping between side menus on boths sides in a single gesture.
* Global menu configuration. Set-up once and be done for all screens.
* Menus can be presented and dismissed the same as any other View Controller since this control uses custom transitions.
Check out the example project or this [interactive demo](https://appetize.io/app/64a9v3e6b8c6f53zvn5pnny80m) to see it in action!
@@ -21,7 +26,7 @@ Check out the example project or this [interactive demo](https://appetize.io/app
![](etc/InOut.gif)
## Requirements
- [x] iOS 8 or higher
* iOS 8 or higher
## Installation
@@ -118,6 +123,13 @@ menuAddPanGestureToPresent(toView toView: UIView) -> UIPanGestureRecognizer
## Known Issues
Don't try to change the status bar appearance when presenting a menu. When used with quick gestures/animations, it causes the presentation animation to not complete properly and locks the UI. See [radar 21961293](http://www.openradar.me/21961293) for more information.
## About Me
My name is Jon Kent and I'm a freelance iOS designer, developer, and mobile strategist. I love coffee and play the drums. **Hire me!**
🌎 Web: [http://jonkent.me](http://jonkent.me)
✉️ Email: [contact@jonkent.me](mailto:contact@jonkent.me)
## License
SideMenu is available under the MIT license. See the LICENSE file for more info.
+1 -1
View File
@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = "SideMenu"
s.version = "1.1.5"
s.version = "1.1.6"
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.