GithubHelp home page GithubHelp logo

ecslidingviewcontroller / ecslidingviewcontroller Goto Github PK

View Code? Open in Web Editor NEW
4.3K 163.0 819.0 1.49 MB

Customizable sliding view controller container.

License: MIT License

Objective-C 98.12% Ruby 0.65% C 0.41% Shell 0.82%

ecslidingviewcontroller's Introduction

Note: This project is no longer maintained.

ECSlidingViewController 2

ECSlidingViewController is a view controller container that manages a layered interface. The top layer anchors to the left or right side of the container while revealing the layer underneath it. This is most commonly known as the "Side Menu", "Slide Out", "Hamburger Menu/Drawer/Sidebar", etc...

iPhone and iPad Mini screenshots

Supports all screen sizes and orientations.

Features

The philosophy behind ECSlidingViewController is to provide simple defaults while being customizable. It may not work or look the way you want out of the box, but it doesn't get in the way when customizing it.

Well Behaved View Controller Container

Your view controllers will receive the appropriate view life cycle and rotation methods at the right time. Their layouts will be appropriately updated on rotation or bound changes while respecting their edgesForExtendedLayout property. This means you have control over how your view controllers position themselves under or below the status bar, navigation bar, or any other container that sets a topLayoutGuide.

ECSlidingViewController tries its best to feel like it is a part of the UIKit view controller container family, and it works when nesting any combination of them together.

Storyboards Support

Basic configuration can be done by using User Defined Runtime Attributes. ECSlidingViewController comes with a custom segue and supports unwind segues for transitioning between view controllers.

This feature is optional and everything can be done programmatically if you wanted. Just like any other view controller container, you will most likely use Storyboards with some programmatic customizations.

Custom Transitions

If the default sliding animation or swiping interaction to move the top view doesn't suit your needs, then you can customize them by providing your own.

Custom transitions use the new protocols introduced in iOS 7 while exposing an API similar to the API that the UIKit containers expose for custom transitions. You should feel right at home if you are familiar with the custom transition API in iOS 7.

Requirements

  • iOS 7
  • Xcode 5

Note: For iOS 5-7 support, ECSlidingViewController version 1.x is available on this branch.

Installation

Install with CocoaPods by adding the following to your Podfile:

platform :ios, '7.0'
pod 'ECSlidingViewController', '~> 2.0.3'

Note: We follow http://semver.org for versioning the public API.

Or copy the ECSlidingViewController/ directory from this repo into your project.

Documentation

Header Files

The public API is documented in the header files. It will automatically show up in Xcode 5's quick help, or you can view it online:

ECSlidingViewController Reference at cocoadocs.org

Sample Code

A good way to learn how to use ECSlidingViewController is to go through the example apps in Examples.xcworkspace. Each example has a README with an explanation of how things are done.

  • BasicMenu. Complete example using Storyboards with minimal code.
  • LayoutDemo. This is a universal app showcasing the layout.
  • TransitionFun. See how custom transitions are done.

Note: There is a problem with the simulator flashing the animation when cancelling an interactive transition. This does NOT happen on the device.

Wiki

The wiki contains guides that go into more detail on how to use specific features of ECSlidingViewController.

ECSlidingViewController Wiki Homepage

Getting Help

If you need help using ECSlidingViewController, please post a question on StackOverflow with the "ECSlidingViewController" tag. Also, the more context you can provide (such as sample projects) the easier it will be for you to get help.

If you think you found a problem with ECSlidingViewController, please post an issue. A sample project or fork of any of the examples demonstrating the problem will help us fix the issue more quickly.

Credits

Created and maintained by Mike Enriquez.

Neo Innovation (formerly known as EdgeCase) for allowing Mike to work on ECSlidingViewController on company time during its inception. He is no longer with the company, but continues to maintain the project.

And... to those of you who contributed changes or reported issues.

MIT License

Copyright (c) 2013 Michael Enriquez (http://enriquez.me)

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.

ecslidingviewcontroller's People

Contributors

anagromataf avatar chris-k avatar danlite avatar dusek avatar enriquez avatar iwasrobbed avatar justjimmy avatar kschutt avatar leongersing avatar mrbendel avatar natashatherobot avatar pennig avatar rromanchuk avatar soph avatar sovanna avatar stevemoser avatar swizzlr avatar thomashempel avatar tsafrir avatar zdavison avatar zhen9ao avatar zlowred 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

ecslidingviewcontroller's Issues

UINavigationController as the underLeftViewController

I am able to use a UINavigationController as the underLeftViewController however the selection animation from the underLeftViewController to the topViewController doesn't work properly. The topViewController does the bounce animation but when that completes instead of sliding the topViewController over to cover the entire screen it just appears instantly.

Does this already work and I'm not setting up the view controllers properly (if that is the case than some example code setting up the viewControllers programmatically along with your example done programmatically as well would be greatly appreciated) or is there some difficulty in getting this to work?

I want to us an UINavigationController because I was an add and edit button at the top but I would also settle for how Facebook has a tableViewCell the initiates editing mode.

Starting App in landscape orientation

Hi,
I'm setting the ECSlidingController as root like in the example:

self.window.rootViewController = slidingViewController;

also I'm setting the orientation programmatically:

[application setStatusBarOrientation:UIInterfaceOrientationLandscapeRight];

But the Sliding Controller remains in portrait mode and won't be transformed, even
if I fire the corresponding events. Could you give me a hint please? Am I missing
something?

Thanks in advance.

[self.view addGestureRecognizer:self.slidingViewController.panGesture]; Throws NSInvalidArgumentException error when used with UITabBarController

When trying to use ECSlidingViewController with UITabBarController, the code throws an error on this line:
[self.view addGestureRecognizer:self.slidingViewController.panGesture];

Following is the error thrown:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
*** First throw call stack:
(0x1cec552 0x111fe7e 0x1ca014a 0x1ca0000 0xbda79 0x30c75 0x14ecf7 0x14ed62 0x14f00a 0x166345 0x16642b 0x1666d6 0x1667d1 0x1672fb 0x167419 0x1674a5 0x26c08b 0xbe317 0x11336b0 0x22e80da 0x22dc470 0x22e7fc9 0x15cd5d 0xa5c76 0xa478f 0xa46a9 0xa3904 0xa373e 0xa44f9 0xa73f2 0x1514cc 0x9e6d9 0x9e88c 0x9ea22 0xa7a37 0x6bafc 0x6cadb 0x7de15 0x7ed4b 0x70828 0x1c47e39 0x1c47b10 0x1c621b5 0x1c61f22 0x1c93176 0x1c92504 0x1c923db 0x6c30a 0x6e18c 0x1e8d 0x1db5 0x1)
libc++abi.dylib: terminate called throwing an exception

Adding to App Navigation Controller

I have an app that displays a UICollectionView with navigation controller and then taping an item brings you to the detail view of that item. I want to add the ECSlidingViewController to ONLY the detail view to have additional information underneath the the detail view.

I have been trying to figure this out for days and cant seem to get it to work correctly. I have followed all the steps but applied then to the detail view and it will not work.

My project is using storyboards.

Any help would be great, thanks!

UISearchBar frame resize issue

Hi,

first of all, congratulations on the spectacular work.

In the meanwhile I'm having a problem that maybe someone can help me with. In the UnderRightViewController, when you start a search, everything resizes fine but when you hit cancel, you can see that the UISearchBar does not resize with animation. I've googled UISearchBar animations and found that there are some problems with resizing of search bar being ignored and resized being forced immediately. Can someone please help me with that?

Thank you,

Pwdro

Licence

Hi,

I stated using your sliding view, and have to say great job done here. So far I have no issues, just wanted to ask about licence?

Am I free to include your code in my project? Is there any problems if my product goes on AppStore?

Best regards,
balabs

ECSlidingViewController and iOS4

Hello,

I try to use your excellent sliding view on ios 4, I changed all the storyboard by XIB and made some changement to be OK but I still have a problem with the view controller container :

willMoveToParentViewController
removeFromParentViewController
didMoveToParentViewController
addChildViewController

are not enable on ios 4 , do you have an advice that can help me to don't use these methods ?

Thank you in advance :)

ECSlidingViewController with UINavigationController leaves 20px gap

I'm seeing an odd issue with iOS 6 and ECSlidingViewController when sandwiching it inside a UINavigationController and then having the topViewController be a UINavigationController.

The topViewController (UINavigationController) erroneously adds a 20px gap at the top of the view, exposing the underLeftViewController.

This issue goes away when the drawer is opened, then closed.

The issue goes away if I set the status bar to hidden.

Here's how I'm setting up the view controller stack in app launch:

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

ECSlidingViewController *slidingViewController = [[ECSlidingViewController alloc] init];

UIViewController *topViewController = [[MPViewController alloc] initWithNibName:@"MPViewController" bundle:nil];

UIViewController *bottomViewController = [[MPBottomViewController alloc] initWithNibName:@"MPBottomViewController" bundle:nil];

UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:topViewController];
[navigationController setNavigationBarHidden:YES];

[slidingViewController setTopViewController:navigationController];
[slidingViewController setUnderLeftViewController:bottomViewController];

UINavigationController *rootNavigationController = [[UINavigationController alloc] initWithRootViewController:slidingViewController];
[rootNavigationController setNavigationBarHidden:YES];

self.window.rootViewController = rootNavigationController;

Here is a sample project with the issue: http://cl.ly/0w0o1i3h1M2F

Is anyone else seeing this issue?

Getting back scrollsToTop behavior in the topViewController

When you extend the SampleTableViewController in the demo with more sample items so that the table can actually be scrolled, you'll see that tapping the status bar no longer scrolls the table to the top.

Any idea on how to restore the proper behavior here?

Load topViewController in InitialSlidingViewController

I beleive it's better to clean AppDelegate:

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
    return YES;
    }

And add to to InitialSlidingViewController.h

  • (void)viewDidLoad
    {
    [super viewDidLoad];
    UIStoryboard *storyboard;

    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
    storyboard = [UIStoryboard storyboardWithName:@"iPhone" bundle:nil];
    } else if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
    storyboard = [UIStoryboard storyboardWithName:@"iPad" bundle:nil];
    }

    self.topViewController = [storyboard instantiateViewControllerWithIdentifier:@"FirstTop"];

Shadow doesn't show on right side when in landscape view

If the iPad is in landscape view the shadow on the top view doesn't show up. The problem is on line 115 of ECSlidingViewController.m. The width and height need to be switched for bezierPathWithRect when the device is in landscape view and back to regular when the device is in portrait view.

Shadow disappears regularly

Just playing around with the code and I noticed the shadow of the main view controller will disappear rather regularly. If I decided to use this I'll try to look into the issue some more but wanted to make a ticket now while I remember.

simplification

hi,

this code is great. thanks.

UIViewController has a storyboard property, so:

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
    storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:nil];
} else if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
    storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPad" bundle:nil];
}

can be simply replaced with:

self.storyboard

Block revealing right empty space when there is no underRightViewController

Currently ECSlidingViewController behaves quite unwisely when there is nothing under the right side (underRightViewController = nil). Is there any way quick way to make this check and block revealing empty right space?

I have tried to override updateTopViewHorizontalCenterWithRecognizer: in my ECSlidingViewController subclass, but it gives me compilation errors since many paramaters used there are private.

disable sliding menu on second level view controllers

In the example application there is the following set of ViewControllers:
NavigationTopViewController -> SampleTableViewController -> (Detail)View Controller

How would it be possible to deactivate the Pan-gestures to reveal the under-left and under-right views in the DetailView?
My desired behavior is to only have those gestures activated on the first-level view-controllers, in the example: FirstTopViewController, SecondTopViewController, ThirdTopViewController and NavigationTopViewController+SampleTableViewController.
But not in second-level View-Controllers like the DetailView, which is following the SampleTableViewController.

Also, shouldnt this be the default behavior?

UINavigation Landscape mode

Hi,

Seems like there is some odd behaviour when pressing the back button in the UINavigation example when in landscape mode. The animation is not consistent with the default behaviour when going back. It seems to be working fine in portrait mode though.

Great work by the way

on revealMenu objects on topViewController disappear

This does not seem to be a major issue, more of a UI annoyance. It only seems to happen running on iOS 5.1.1 (not sure about iOS versions lower). No problems running on iOS 6>

What happens is when revealMenu: is called and the menu is displayed in the leftUnderSide and the topViewController is still showing a bit on the right-side of the screen, all of the objects (i.e., navigation bar, uilabels, etc) vanish. Then when swiping back to the topViewController they all reappear.

So again, not a major problem per se, more of an unattractive annoyance.

Anyone experience this? Have a solution?

Thank you.

Load ECSliding after another view controller

I want to show another view controller with login/signup controls before i present the ECSlidingViewController

Please help, i dont know where to place the code and how to modify it

ECSlidingViewController *slidingViewController = (ECSlidingViewController *)self.window.rootViewController;
  UIStoryboard *storyboard;

  if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
    storyboard = [UIStoryboard storyboardWithName:@"iPhone" bundle:nil];
  } else if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
    storyboard = [UIStoryboard storyboardWithName:@"iPad" bundle:nil];
  }

  slidingViewController.topViewController = [storyboard instantiateViewControllerWithIdentifier:@"FirstTop"];

No drop shadow visible when the top controller is a UITableViewController

I've found that when I use UITableViewControllers as top controllers, I can't get a drop shadow to appear when the top controller slides over. I'm using the same code for other top controllers in my app, and they show drop shadows. Here's my viewWillAppear:

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];

    self.view.layer.shadowOpacity = 0.75f;
    self.view.layer.shadowRadius = 10.0f;
    self.view.layer.shadowColor = [UIColor blackColor].CGColor;

    if (![self.slidingViewController.underLeftViewController isKindOfClass:[FDCNavigationScreenController class]]) {
        self.slidingViewController.underLeftViewController  = [self.storyboard instantiateViewControllerWithIdentifier:@"NavigationController"];
    }

    [self.view addGestureRecognizer:self.slidingViewController.panGesture];
}

As I mentioned above, this is the same viewWillAppear: that I use in other controllers. Any thoughts on this? Thanks for putting this together, by the way. It's pretty great!

Ben

Subview wantsfullscreen leaves 20px space at top

heres the setup

[slidingViewController -> topView -> navigationcontroller]

after a couple drilldowns in the navigationcontroller i set the statusbar to translucent, the navbar to translucent and set the view's wantsfullscreen to yes

the view resizes to fullscreen minus the 20px status bar spot.

WHenever i load the same navigation controller not contained within the slidingViewController it fills the entire screen so i've narrowed it down so some sort of behavior of the slidingViewController.

any ideas?

Heres the code im using to make the view go fullscreen

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleBlackTranslucent;
    self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent;
    self.navigationController.navigationBar.translucent = YES;
    [self setWantsFullScreenLayout:YES];

}

Using Static Cells

Is there a method of using static cell data for the slider? After a couple of attempts I cannot get it to work correctly.

Primitive properties use "unsafe_unretained" not "assign"

Is there a reason why the properties in ECSlidingViewController for primitive types (CGFloat, BOOL, enums) are declared as "unsafe_unretained" and not "assign". As I understand "unsafe_unretained" is for use with pointer types (not primitive types) in pre-iOS5.

Specfile for CocoaPods

It would be great if there was a specfile added to CocoaPods (http://cocoapods.org/) for ECSlidingViewController. I'm happy to create one but it might make more sense for you to submit it since then you can coordinate updates to the project.

Let me know if you'd prefer to add one yourself or should I go ahead and do it.

Cheers,
Denis

Make underLeftViewController a navigation controller

Is it possible to have the underLeftViewController act as a navigation controller, so when I click on a particular cell, it will transition to a new underLeftViewController? I've been able to do it without a navigation controller and without the animation, but I'd really like to have the slide to left animation that goes with a navigation controller.

I've tried with a navigation controller, but when I click on the connected cell, nothing happens. Any ideas?

Loading UIWebView From Right Sliding UITableview

Hey guys I'm parsing a news feed into the right slide out UITableView, when i select a article i want a UIWebView in the main view to load the link supplied by the rss feed. The URL is being passed to the DetailView fine, I'm getting no errors just the UIWebView refuses to load, I've tried everything i can think off with no luck. Anyone got this working & if so what methods did you use? Any help would greatly appreciated! Heres the code I'm using:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{

 NewsDetailViewController *detail = [[NewsDetailViewController alloc] init];
 detail.detailItem = [stories objectAtIndex:indexPath.row];

 NSMutableDictionary *article = [stories objectAtIndex:indexPath.row];
 NSString *loadURL;
 loadURL=[[[NSString alloc] initWithString:[article objectForKey:@"link"]] stringByTrimmingCharactersInSet:   [NSCharacterSet whitespaceAndNewlineCharacterSet]];

  [detail loadPage:loadURL];
}

//THIS IS IN THE DETAIL VIEW

-(void)loadPage:(NSString *)urlString{

_webView.delegate =self;
NSURL* url = [NSURL URLWithString:urlString];
[_webView loadRequest:[NSURLRequest requestWithURL:url]];
NSLog(@"LOAD Page Working = %@", urlString);
NSLog(@"Webview = %@", _webView);

}

how to set view controllers underneath with nibs rather than storeyboard?

The question is also asked here:
http://stackoverflow.com/questions/14170220/how-to-make-initwithnibname-behave-like-instantiateviewcontrollerwithidentifier

the idea is that in the example code.. we instantiate a view controller using [storyboard instantiateViewControllerWithIdentifier], which returns a loaded view controller immediately.. i'm working with an existing framework that doesn't use storeyboards.. and so i gotta use initWithNibName.. which doesn't load the returned viewController until it has actually being visited by the user.. and so my app crashes.. any ideas (more details in the SOF question).

add a main menu before the firsttop, etc get loaded.

i'm trying to modify your demo to add a main menu before the firsttop, etc get loaded.

I have try to

-remove " //slidingViewController.topViewController = [storyboard instantiateViewControllerWithIdentifier:@"FirstTop"];" from the appdelegate.

  • Put 2 buttons on the initialsliding view controller (trying to use this one as main menu)
  • On the first button, put the code:
  • (IBAction)btn_Positions:(id)sender {

ECSlidingViewController *slidingViewController = (ECSlidingViewController *)self.window.rootViewController;
UIStoryboard *storyboard;

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
storyboard = [UIStoryboard storyboardWithName:@"iPhone" bundle:nil];
}
else if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
storyboard = [UIStoryboard storyboardWithName:@"iPad" bundle:nil];
}

slidingViewController.topViewController = [storyboard instantiateViewControllerWithIdentifier:@"FirstTop"];

}

The code are called, I can see my 2 buttons, but when I try to click on button, but nothing append.(breakpoint confirm that I go to btn_Positions.

I'm VERY sorry, i'm sure this was ridiculously easy.

Have a nice day!

Franck

issue 24 - navigation "back" animation does not work

Although issue 24 is closed, there is another issue not solved in that discussion.
I can successfully create the left menu as a navigation menu so that it can show master-detail tableviews.
Unfortunatelly, the "back" animation does not work. Does anyone have the solution?

Panning back not possible with navigation bar

When adding the gesture recognizer to a navigation bar, panning back is not possible. E.g.:

[self.navigationBar addGestureRecognizer:self.slidingViewController.panGesture];

It is possible to drag the top view to the right using the navigation bar, but once the top view is anchored it's not possible to drag back (restore) the top view using its navigation bar. When using the swipe gesture to put table view cells in editing mode it's not an option to attach the gesture recognizer to the whole tableView.

creating UItabbar delegate

Hi, Great project! I trying to include a UITabBarController as child controller but I unable to hook delegate of UITabBar with appdelegate.

Normally I used this to connect delegate as UITabBarController is in initial view
UITabBarController tbc = (UITabBarController)self.window.rootViewController;
tbc.delegate = self;

Now, i'm using initialSlidingViewController as my rootViewController.
How can I connect the delegate of UITabbarController?

Add IBOutlets

Is there a reason why topViewController, underLeftViewController, and underRightViewController aren't IBOutlets? If they are outlets, then I can wire them in a storyboard or xib, rather then in code.

anchorTopViewTo does not work as expected under iOS 6

In the demo project, add

[self revealMenu:nil];

to the viewWillAppear method of FirstTopViewController.

Now, if starting in portrait on an iPad running iOS 6 everything works as expected, but if starting in landscape the top view slides too much to the right. This does not happen in the iOS 5.1 simulator.

Store view controllers for reuse

Hello,

Would it be possible to duplicate the functionality of the tab bar controller and reuse a view controller if it has previously been loaded?

First View On Launch

Upon opening an application you are not taken to the first view, is there a way for it to actually take you to a particular view - if you look in the example application and slide to the left to see the list the first item is not selected. How would you go about making it selected upon launch?

Sliding with Three20 ?

Hey,

I'm looking for this control to play nicely with the Three20 library and without a story board.
But I have to work with an other navigation controller. Is there a way to use this control only in one View ?

lagging on the animation when topViewController is a UINavigationController.

I'm also experiencing some lagging on the animation when my topViewController is a UINavigationController. I did everything programmatically without any nib or storyboard files.

Here's how I do it:

I have a UIViewController like the FirstTopViewController in the demo app. Then I create a UINavigationController, set root view controller to my UIViewController and set ECSlidingViewController.topViewController to this UINavigationController.

Am I doing something wrong?

_dashboardViewController = [[DashboardViewController alloc] init];
_dashboardNavigationController = [[UINavigationController alloc] initWithRootViewController:_dashboardViewController];

_initialSlidingViewController = [[InitialSlidingViewController alloc] init];
[_window setRootViewController:_initialSlidingViewController];

_slidingViewController = (ECSlidingViewController*)[_window rootViewController];

[_slidingViewController setTopViewController:_dashboardNavigationController];
Any help would be appreciated.

Sliding View Controller Inception

Is there a way of putting a sliding view controller within a sliding view controller, in order to make some form of stacked views. I am attempting to implement this with no luck. Something similar to the twitter iPad app?

Start With Menu Showing

Is there a way of opening up the application with the the top view already slid to the right so that the menu is visible upon start?

Modal with memory warning

When a modal is presented from the main view and the application receives a memory warning, after the modal disappears, the main view does not redraw itself. I have tested this by show a simple modal from the first view in the sample application.

Limit the drag amount by user

How do i change the code such that i can limit the drag distance when user drag to show left menu? Thanks in advance

Nested UINavigationController don't animate pop transitions

If you have nested UINavigationController's in the left or right views, they don't animate pop transitions properly. Also the delegate isn't called correctly. It appears something with the layout structure of ECSlidingViewController is preventing the UINavigationController from properly functioning.

Cannot slide to underRightViewController from modally presented ViewController

I thought that the issue was that, due to the slidingViewController convenience method finding the reference to the initial slidingViewController via the parent-child hierarchy, that because my modally presented VC has a presentingViewController rather than a parentViewController that I was unable to get a reference to the slidingViewController. So I modified the convenience method like so:
if (self.presentingViewController) {
UIViewController *viewController = self.presentingViewController;
while (!(viewController == nil || [viewController isKindOfClass:[ECSlidingViewController class]])) {
viewController = viewController.parentViewController;
}
return (ECSlidingViewController *)viewController;
} else {
UIViewController *viewController = self.parentViewController;
while (!(viewController == nil || [viewController isKindOfClass:[ECSlidingViewController class]])) {
viewController = viewController.parentViewController;
}
return (ECSlidingViewController *)viewController;
}

Now I'm getting a reference to the slidingViewController, as I expected, but the pan gesture does not actually reveal the view. The underRightViewController's viewWillAppear method does fire but the view doesn't actually show up. Any suggestions?

setAnchorLeftRevealAmount doesn't work

Hi guys,

I did reconfigured the Reveal Anchor of left View Controller is [self.slidingViewController setAnchorRightRevealAmount: 250.0f]

then
I assume that to change the Reveal Anchor of right VC is setAnchorLeftRevealAmount but it doesn't work.

Do you have any idea? 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.