Giter Site home page Giter Site logo

erichoracek / msdynamicsdrawerviewcontroller Goto Github PK

View Code? Open in Web Editor NEW
3.2K 126.0 399.0 19.4 MB

Container view controller that leverages UIKit Dynamics to provide a realistic drawer navigation paradigm.

License: MIT License

CSS 7.99% TeX 1.10% Objective-C 88.20% Ruby 0.87% C 0.34% Shell 1.50%

msdynamicsdrawerviewcontroller's Introduction

Introduction

MSDynamicsDrawerViewController was written by Eric Horacek for Monospace Ltd.

What is it?

MSDynamicsDrawerViewController is a container view controller that manages the presentation of a single "pane" view controller overlaid over one or two "drawer" view controllers. The drawer view controllers are hidden by default, but can be exposed by a user-initiated swipe in the direction that that drawer view controller is hidden in. It uses UIKit Dynamics for all animation—there's not a single call to animateWithDuration:animations: in the project.

UIKit Dynamics?

MSDynamicsDrawerViewController integrates with Apple's UIKit Dynamics APIs (new in iOS7) to provide a realistic new feel to the classic drawer navigation paradigm. While the .gifs below can do it some justice, it's best to just clone, build, and run the example project on a device to get a feel for it how it performs.

So what can I do with it?

Fling

Open and Close

Bounce

Replace

Installation

Add the following to your Podfile and run $ pod install.

pod 'MSDynamicsDrawerViewController'

If you don't have CocoaPods installed or integrated into your project, you can learn how to do so here.

Documentation

CocoaDocs

Documentation for MSDynamicsDrawerViewController is available online via CocoaDocs.

Xcode

If you would like to install the MSDynamicsDrawerViewController documentation into Xcode, you can do so by first installing Appledoc ($ brew install appledoc), and then by running the Documentation target in the MSDynamicsDrawerViewController.xcodeproj in the root of repository.

Example

Example.xcworkspace in the Example directory serves as an example implementation of MSDynamicsDrawerViewController. It uses Cocoapods to link with the MSDynamicsDrawerViewController source files in the root directory as a development pod. As such, use the example xcworkspace and not the xcproj.

Usage

Pane View Controller

The pane view controller is the primary view controller, displayed centered and covering the drawer view controllers. The user can swipe anywhere on the pane view controller to reveal the drawer view controllers underneath.

Instances of UIViewController can be added as the pane view controller via the paneViewController property:

UIViewController *paneViewController = [UIViewController new];
dynamicsDrawerViewController.paneViewController = paneViewController;

Replacing the Pane View Controller

The pane view controller can be replaced with an animation that slides the pane off to the side, replaces it with a new pane, and slides the new pane closed. See the "Replace" .gif above to view this animation. You can initiate this animation with the the setPaneViewController:animated:completion: method:

UIViewController *paneViewController = [UIViewController new];
[dynamicsDrawerViewController setPaneViewController:paneViewController animated:YES completion^{
    // Successfully set the pane view controller
}];

If you don't want the "slide off" portion of this animation, set the value of the paneViewSlideOffAnimationEnabled property on your MSDynamicsDrawerViewController instance to NO.

Drawer View Controllers

The drawer view controllers are revealed as drawers underneath the pane view controller. Drawer view controllers can be set for any of the cardinal directions (top, left, bottom, or right). The MSDynamicsDrawerDirection typedef is used to communicate these directions to the instance of MSDynamicsDrawerViewController.

Instances of UIViewController can be added as drawer view controllers via the setDrawerViewController:forDirection: method:

UIViewController *drawerViewController = [UIViewController new];
[dynamicsDrawerViewController setDrawerViewController:drawerViewController forDirection:MSDynamicsDrawerDirectionLeft];

When adding two simultaneous drawer view controllers, they view controllers must be in opposing directions (left/right or top/bottom).

Replacing or Removing a Drawer

To replace or remove the drawer view controller, just set either the new UIViewController instance or nil for the desired direction using the method above.

Opening and Closing the Drawers

The various methods that modify the paneState property are the go-to for changing the "open" state of the drawer.

Non-Animated

If you just want to open or close the drawer without an animation and you only have one drawer view controller, use the paneState property:

dynamicsDrawerViewController.paneState = MSDynamicsDrawerPaneStateOpen;

If you have more than one drawer view controller, see the multiple drawer view controllers section below.

Animated

If you want to make animated changes to the drawer visibility, use the setPaneState:animated:allowUserInterruption:completion: method. As with the paneState property, this method requires that you have added only a single drawer view controller.

[dynamicsDrawerViewController setPaneState:MSDynamicsDrawerPaneStateOpen animated:YES allowUserInterruption:YES completion:^{
  // Pane has come to rest
}];

A key point of consideration when invoking this method is the allowUserInterruption parameter. If set to NO, the user will be able to perform gestures that "catch" the sliding pane, interrupting the transition and causing the end paneState to potentially differ from the value passed for the paneState parameter. As such, the completion block is not necessarily called when the pane state has changed—just when it has come to rest. If you require that the pane's state is updated to the specified state without interruption, you must pass YES for this parameter.

If you have more than one drawer view controller, see the multiple drawer view controllers section below.

With Multiple Drawer View Controllers

If you have more than one drawer view controller added to your MSDynamicsDrawerViewController instance, you should to use the "directional" equivalents of the methods above:

  • Non-Animated setPaneState:inDirection:
  • Animated setPaneState:inDirection:animated:allowUserInterruption:completion:.

Bouncing the Pane Open

The pane can be bounced open by invoking the bouncePaneOpen method. If you have more than one drawer view controller, use the bouncePaneOpenInDirection: method and specify a direction. See the "Bounce" .gif above for an example of this behavior.

A bounce is a good way to indicate that there's a drawer view controller underneath the pane view controller that can be accessed by swiping, similar to the iOS lock screen camera bounce.

Stylers

MSDynamicsDrawerViewController uses an instances of "styler" objects to create unique styles on the child view controllers updated relative to the fraction that drawers are opened/closed. These stylers conform to the MSDynamicsDrawerStyler protocol. Stylers can be combined (assuming they aren't overwriting identical attributes) by setting multiple stylers for a single MSDynamicsDrawerDirection.

Instances of MSDynamicsDrawerStyler are added to MSDynamicsDrawerViewController via the addStyler:forDirection: method, and instantiated via the styler class method:

id <MSDynamicsDrawerStyler> parallaxStyler = [MSDynamicsDrawerParallaxStyler styler]
[dynamicsDrawerViewController addStyler:parallaxStyler forDirection:(MSDynamicsDrawerDirectionLeft | MSDynamicsDrawerDirectionRight)];

Default Styler Classes

There are a few default stylers included with MSDynamicsDrawerViewController. The Stylers menu option in the example project enables you to try these individually or in combination.

  • Parallax Styler MSDynamicsDrawerParallaxStyler Creates a parallax effect on the drawerView as the frame of the paneView is adjusted. Modify the parallaxOffsetFraction property to change the amount of parallax that occurs.

  • Fade Styler MSDynamicsDrawerFadeStyler Fades the drawerView as the frame of the paneView is adjusted. Modify the closedAlpha property to change the amount of fade that occurs when the paneView is closed.

  • Scale Styler MSDynamicsDrawerScaleStyler Creates a zoom-in scaling effect on the drawerView as the frame of the paneView is adjusted. Modify the closedScale property to change the scale that occurs when the paneView is closed.

  • Drawer Resize Styler MSDynamicsDrawerResizeStyler Resizes the drawer view controller's view to fit within the visible space that a drawer is opened to as derived from the currentRevealWidth property. Modify the minimumResizeRevealWidth property to change the threshold at which the resizing begins.

Creating a Custom Styler

As user interacts with a MSDynamicsDrawerViewController, the styler classes that are associated with the active drawer direction are messaged via the method dynamicsDrawerViewController:didUpdatePaneClosedFraction:forDrawerDirection:. This method enables the styler to changes attributes of the drawerView, paneView, etc. relative to the paneClosedFraction.

It's recommended that custom stylers don't change the frame attribute of the paneView or the drawerView on the MSDynamicsDrawerViewController instance. These are modified internally both by the user's gestures and the internal UIKit Dynamics within MSDynamicsDrawerViewController. The behavior of MSDynamicsDrawerViewController when the frame is externally modified is undefined.

Requirements

Requires iOS 7.0, ARC, and the QuartzCore Framework.

Contributing

Forks, patches and other feedback are welcome.

License

Copyright (c) 2012-2013 Monospace Ltd. All rights reserved.

This code is distributed under the terms and conditions of the MIT license.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

msdynamicsdrawerviewcontroller's People

Contributors

ddaddy avatar erichoracek avatar fcanas avatar jhersh avatar joelk avatar khoogheem avatar pyro2927 avatar yas375 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

msdynamicsdrawerviewcontroller's Issues

Static Analyzer: Dereference of null pointer (loaded from variable 'paneLocation')

The Clang Static Analyzer reports 3 warnings in MSDynamicsDrawerViewController.m caused by the dereference of the 'paneLocation' variable:

MSDynamicsDrawerViewController/MSDynamicsDrawerViewController.m:730:13: warning: Dereference of null pointer (loaded from variable 'paneLocation')
if (_paneLocation >= *openWideLocation) {
^~~~~~~~~~~~~
MSDynamicsDrawerViewController/MSDynamicsDrawerViewController.m:734:13: warning: Dereference of null pointer (loaded from variable 'paneLocation')
if (_paneLocation <= _openWideLocation) {
^~~~~~~~~~~~~
MSDynamicsDrawerViewController/MSDynamicsDrawerViewController.m:1081:9: warning: Dereference of null pointer (loaded from variable 'paneLocation')
if (_paneLocation <= paneBoundClosedLocation) {
^~~~~~~~~~~~~
3 warnings generated.

These warnings could be fixed by simply doing:
if (paneLocation && (*paneLocation <= xxxxxxxxx))

Rotation

I'm having a nightmare of a time trying to get some views to display in Portrait but others to be in Landscape.

Any chance you can help with that?

Thanks

PanGesture not (always) recognized by UIView Subclass.

My Pane viewController has a UIView subclass with the following code in the init function:

[self addGestureRecognizer:[[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(control:)]];
[self addGestureRecognizer:[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(control:)]];

In most cases this works fine, but in some cases the Pan gesture isn't recognized by the UIView subclass, but triggers the drawer to open. The Tap gesture works in all cases without any problems. Restarting the App solves the problem, so its unclear what causes the issue.

Any idea's?

SplitViewController Problem in Portrait Mode

I have a menu item that uses a split view controller. When used in landscape mode the menu displays properly. However in portrait mode part of the Master split view controller is displayed instead. The AppDelegate didFinishLaunchingWithOptions: is -

if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
    self.storyboard = [UIStoryboard storyboardWithName:@"Main_iPad" bundle:nil];
    self.dynamicsDrawerViewController = [MSDynamicsDrawerViewController new];

    [self.dynamicsDrawerViewController addStylersFromArray:@[[MSDynamicsDrawerScaleStyler styler], [MSDynamicsDrawerFadeStyler styler]] forDirection:MSDynamicsDrawerDirectionLeft];

    MenuVC *menuVC = [self.storyboard instantiateViewControllerWithIdentifier:@"MenuVCId"];
    menuVC.dynamicsDrawerViewController = self.dynamicsDrawerViewController;

    [self.dynamicsDrawerViewController setDrawerViewController:menuVC forDirection:MSDynamicsDrawerDirectionLeft];


        UISplitViewController *splitViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"SplitVC"];
        UINavigationController *navigationController = [splitViewController.viewControllers lastObject];
        splitViewController.delegate = (id)navigationController.topViewController;
        menuVC.splitCourses = splitViewController;

        DetailViewController *detailVC = (DetailViewController *) navigationController.topViewController;
        detailVC.dynamicsDrawerViewController = self.dynamicsDrawerViewController;
        menuVC.detailVCNC = navigationController;

        self.dynamicsDrawerViewController.paneViewController = splitViewController;

    }


self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.rootViewController = self.dynamicsDrawerViewController;
[self.window makeKeyAndVisible];

    return YES;

The Menu button on the split detail controller should reveal the Menu view controller but instead shows a portion of the split Master controller. I've created a demonstration of this using Xcode's Master-Detail template here:

https://github.com/rhildreth/SplitView-Test.git

Any suggestions on what I'm dining wrong? Thanks.

Ron

Transition animation delegate

It would be great if we could update the delegate as a transition is happening. Right now it's only updates when it loads. However for those who'd like to animate the status bar or anything else as the transition happens, it's currently impossible.

Disable Dragging on Editing TableViews

It's seemingly impossible to re-arrange UITableView cells with this sidebar, unless you disable dragging each time you enter editing mode. However, this is kind of annoying.

The touchForwardingClasses exclusion list isn't necessarily flexible enough to support adding just UITableViews that are in editing mode.

This is easy enough to fix by modifying MSNavigationPaneViewController.m, but I feel like this should be better handled through some subclassing hooks. Do you have any suggestions, other than just overriding the entire gestureRecognizer shoudlReceiveTouch method.

This is currently the code that I'm using:

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
    if (!self.paneDraggingEnabled) {
        return NO;
    }
    __block BOOL shouldReceiveTouch = YES;
    // Enumerate the view's superviews, checking for a touch-forwarding class
    [touch.view superviewHierarchyAction:^(UIView *view) {
        // Only enumerate while still receiving the touch
        if (shouldReceiveTouch) {
            // If the touch was in a touch forwarding view, don't handle the gesture
            if ([view isKindOfClass:[UITableView class]] && ((UITableView *)view).editing)
                shouldReceiveTouch = NO;

            if (!shouldReceiveTouch) {
                [self.touchForwardingClasses enumerateObjectsUsingBlock:^(Class touchForwardingClass, BOOL *stop) {
                    if ([view isKindOfClass:touchForwardingClass]) {
                        shouldReceiveTouch = NO;
                        *stop = YES;
                    }
                }];
            }
        }
    }];
    return shouldReceiveTouch;
}

Storyboard Support

Can it used with Storyboard? Any special consideration or guide doing so?

Removing DrawerViewController from memory

Hello,

I am working with multiple instances (fairly small in comparison to main view in iPad) of the MSDynamicsView controller, that can be added and deleted from the main view.

I am wondering if when removing them from screen and making the DrawerViewController nil, will the complete setup be cleared from memory?

Note: before removing from screen, I assigning nil to all the drawers and pane controllers.

Thanks!

compiler errors

i can't compile the demo project.
i'm having this error:

ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)

any ideas?

Refactor to add UIStoryboardSegue support

Consider adding a UIStoryboardSegue prototype to allow for more native Storyboard layout. Created a simple demo using a subclass of MSDynamicsDrawerViewControl to allow full Storyboard support. Demo exists in a parallel example directory, Example2.

Will send a pull request.

Thanks!

Allow sidebar from a modal view

If I present a modal view from one of my view controllers, is it possible to still be able to swipe, or have the top button to present the sidebar list?

Thanks

iPad Rotation

screen_shot_2014-01-08_at_3 02 26_pm
If using nibs instead of storyboards for iPad, if rotation occurs while menu is displayed it doesn't animate or redraw to fill from landscape to portrait or portrait to landscape.

Memory Leak

Instruments is showing some memory leaks by PhysicsKit. Since MSDynamicsDrawerViewController is the only part of my app that is using PhysicsKit, I thought it might be related.

So just a heads up.

Keep up the good work!
Cheers, Michael.

Screenshot of Instruments

Resize Drawer to suite visible area?

Hi,
My question/issue may be stupid, but I want my left/right drawers to be resized based on what is corresponding revealWidth so that I could see all the contents of drawer.

Let's imagine my drawer is table view where cells have disclosure indicators. They are not visible for the user, while he expects to see them.
Is there any existent property/flag which will help me doing this?

Cannot interact with UI elements in paneView

I am not able to interact with any UI elements in my paneView. I set up the MSDynamicsViewController and paneViewController in -application:didFinishLaunchingWithOptions: as follows:

_viewController = [[MSDynamicsDrawerViewController alloc] init];
PMMainViewController *mainViewController = [[PMMainViewController alloc] initWithNibName:@"PMMainView" bundle:nil];
[_viewController setPaneViewController:mainViewController animated:NO completion:nil];

PMSettingsViewController *settingsViewController = [[PMSettingsViewController alloc] initWithNibName:nil bundle:nil];
settingsViewController.drawerViewController = _viewController;

[_viewController setDrawerViewController:[[UIViewController alloc] init] forDirection:MSDynamicsDrawerDirectionLeft];
[_viewController setDrawerViewController:settingsViewController forDirection:MSDynamicsDrawerDirectionRight];

id <MSDynamicsDrawerStyler> styler = [MSDynamicsDrawerFadeStyler styler];
[_viewController addStyler:styler forDirection:MSDynamicsDrawerDirectionRight];

_window.rootViewController = _viewController;
[_window makeKeyAndVisible];

Even without the drawer view controllers added, UI elements in PMMainView.xib are not receiving touch events.

The menu sometimes does not close itself when changing UIViewControllers

A video is worth a thousand words: http://www.youtube.com/watch?v=rOc5X-xuKuk

I am using an iPhone 4. Randomly, the menu opens wide and never closes again.

If you look at this line, I found that sometimes paneViewIsPositionedInValidState returns NO and dynamicAnimatorDidPause is never called again.
Hence, self.dynamicAnimatorCompletion is never called and the whole process fails.

It seems it needs more fine tuning but I am not able to see what should be done.

Note that if I set paneViewSlideOffAnimationEnabled to NO it works fine since there is no animation, but that's not what I want.

Any idea how to fix this? Thanks

The contents of the pane are unusable when a drawer is open

I'm using the control in an iPad app and want the user to be able to interact with the contents of the pane when a drawer is open, but all taps in the pane cause it to close even if they're on a control. If I turn off tap to close the taps are ignored. I've poked around the gesture recognizers for a while but can't get it to work. Is what I'm after doable?

Something unexpected I noticed is in gestureRecognizer:shouldReceiveTouch: touch.view varies depending on whether a drawer is open or not. When no drawer is open touch.view is the child of paneView. When a drawer is open touch.view is paneView itself.

Gestures handling

Hi, I'm using your control and i faced a quite annoying bug - if i have a view on the paneView with an UISwipeGestureRecoginzer, it struggles with MSDraggableView's internal UIPanGestureRecoginzer - even if i set draggingEnable to NO, you still let this recognizer receive touch in the gestureRecoginzer:shouldReceiveTouch: method.
I suggest that there must be a check if recognizer is pan recognizer and dragging is not enabled - to stop it from receiving touches. Or simply override setDraggingEnable to forward received value to the panGestureRecoginzer.enabled property

Crash when create new MSDynamicsDrawerViewController

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{    
    MSDynamicsDrawerViewController *mainController = [MSDynamicsDrawerViewController new];
    TestVC *centerController = [[TestVC alloc] init];

    // Config
    mainController = [MSDynamicsDrawerViewController new];
    [mainController addStylersFromArray:@[[MSDynamicsDrawerScaleStyler styler], [MSDynamicsDrawerFadeStyler styler]] forDirection:MSDynamicsDrawerDirectionLeft];
    [mainController addStylersFromArray:@[[MSDynamicsDrawerParallaxStyler styler]] forDirection:MSDynamicsDrawerDirectionRight];

    [mainController setPaneViewController:centerController];

    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    self.window.rootViewController = mainController;

    [self.window makeKeyAndVisible];

    return YES;
}

This code crash in MSDynamicsDrawerViewController:

- (void)dealloc
{
    [self.paneView removeObserver:self forKeyPath:@"frame"];
}

I don't understand what I'm doing wrong

Thanks 😃

panDelta variable not initialized - Clang Static Analyzer warning

When running the Clang Static Analyzer on MSDynamicsDrawerViewController, it reports a logic error "Result of operation is garbage or undefined".

The file MSDynamicsDrawerViewController.m contains the method -[MSDynamicsDrawerViewController panePanned:] which has an uninitialized variable 'panDelta'. In some cases it is possible that this variable is not initialized at all leading to possible random behavior.

The fix consists at replacing the line:
CGFloat panDelta;
by
CGFloat panDelta = 0;

warning

Instantiating View Controllers

I am currently working on creating multiple instances or MSDynamicsDrawerViewController on a main View controller (little views that can be dragged). What happens is that when I want to open the drawer controller, the status bar (where the time, battery level are) moves with this little drawer.

This should not happening since I am moving the little drawer inside the main view. I found that when i comment the following line in the method - (void)paneViewDidUpdateFrame this can be avoided.

//statusBar.transform = CGAffineTransformMakeTranslation(self.paneView.frame.origin.x, self.paneView.frame.origin.y);

Maybe it would be a good idea to make this a setting that can be accessed when this is a required behaviour.

Thanks!

Animation to the right optional

Please make the animation to right of the old pane to be optional because I have some buttons on the master view that are positioned to the right of the view and when the old pane is moved to the right then they will be misplaced.

P.S.: Also, can you push the podspec with the 0.2.0 version to the CocoaPods?

Thanks!

How can I tell when the drawer has closed?

I want to know when the drawer has closed, but I don't see a way to do that. I searched the issues and it seems like the issue came up before but when I search for the code those discussions talked about, I don't find anything.

Unusual Status Bar Behavior

The status bar is not behaving as I would imagine it would. Currently, it moves over with the Overlaid view, rather than staying stationary the entire time. I'd imagine it working more like Vesper does.

Thoughts on this?

pod install error

Executing pod install on the Example project gives error:
Fetching podspec for MSDynamicsDrawerViewController from ../
[!] Unable to satisfy the following requirements:

  • MSDynamicsDrawerViewController (from../) required by Podfile

'Unable to set pane to an open state with multiple possible reveal directions'

Hey Guys. I am using Left and Right drawer. Right drawer has the ability to change PaneViewControllers and Left drawer is used just for some settings and search. I would like to have [self.dynamicsDrawerViewController setPaneViewSlideOffAnimationEnabled:YES]; because I like that close/open animation but it is clearly not possible when having two drawers. App crashes and the log says this issue subject.
Maybe you could add a property for this, for example PaneViewSlideOffAnimationDirection...

Also, in future, it would be nice to think of some different ways to animate the pane transition.

Cheers, I hope this will be fixed soon.

_

_

Allow swipe on certain cells but not others?

Hi, thanks for this control, it is really useful.

I've added UITableViewCell to the touchForwardingClasses array and it works good, however if I have a table where some of the cells are editable and some are not, would it be possible to only forward the swipe gesture to the cells that are editable?

Thanks

Keep bouncing when 'elasticity' set to 1

I'am not sure if it's intent to be like this, but it's meaningless to set the 'elasticity' to 1 and it makes the app keeps bouncing until the end of the world, you just can't stop it, it's annoying.

How to play a movie at startup use storyboard

Hi, everyOne.

  "MSNavigationPaneViewController" is so great! I use it in my App. I want to play a movie at startup. How to fix that in AppDelegate? I just use storyboard. Thank you a lot.

Best regards

kenpig

paneState property never initalized

Nice stuff...Thanks!

I had an older bit of code that uses a UINavigationController in the pane. XCode can autogenerate some code for the app delegate application:supportedInterfaceOrientationForWindow:orientations method that assumes the root window controller is a UINavigationController when querying for the currently presented view controller so that it can determine supported rotations.

After making your class the root view controller in this old app, I wrote a bit of code replacing the old auto-generated code to determine who was currently on the screen during the rotation - the master or the pane view controller. When the app starts up, I saw that the property I was looking at, paneState, is never initialized. I get a paneState == MSNavigationPaneStateOpen (i.e. BOOL NO, or integer 0) at app startup.

I assume this should be set to MSNavigationPaneStateClosed in the initialize method of the class. I am currently setting it manually when I initialize the class as a working fix. Or is it properly set elsewhere? Quite possibly my (BOOL) dyslexia is in full swing.

Thanks

Shadow example?

Hi,

I tried to add shadow to pane view but it's lagged resulting in choppy animation
most likely because of the shadowPath is not defined, but i don't know how to define it in this drawer view controller.

Since it's quite a common thing in now days app, hopefully you can give the solution.

Here is what i am doing now.

drawerController.paneViewController.view.layer.shadowColor = [UIColor blackColor].CGColor;
drawerController.paneViewController.view.layer.shadowOpacity = 0.4;
drawerController.paneViewController.view.layer.shadowRadius = 4;

Thanks

Hidden status bar area

Sometimes panes hide the status bar area, placing their navigation bar's to the top.
This screenshot will better describe the problem.

screenshot

I tried to find the problem by debugging but couldn't come across to it.
As we're about to release the app, any suggestion to fix this or an update to the repo would be appreciated.

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.