Note that there are some explanatory texts on larger screens.

plurals
  1. POECSlidingViewController with UITabBarController
    primarykey
    data
    text
    <p>I have a requirement where I need to slide the view but thats inside a UITabBarController.</p> <p>Does any one tried doing that ? ECSlidingViewController works perfect if I make it rootViewController but I want that in UITabBarController.</p> <p>I tried setting the ECSlidingViewController as one of the view controllers for the UITabBarController but it keeps crashing after the first swipe or some times it goes in infinite loop</p> <p>Below is my code</p> <pre><code> myWorkController = [[TaskWorkViewController alloc] initWithNibName:@"WorkViewController_iPhone" bundle:nil]; // This is the controller where I have my specific logic myWorkNavController = [[[UINavigationController alloc] initWithRootViewController:myWorkController] autorelease]; // setting the myWorkController to UINavigationController as I need to navigate from this view controller to different view on specific actions </code></pre> <p>//SlidingviewController setup self.slidingViewController = [ECSlidingViewController slidingWithTopViewController:myWorkNavController]; </p> <pre><code> self.slidingViewController.topViewController = myWorkNavController; [myWorkNavController.view addGestureRecognizer:self.slidingViewController.panGesture]; self.slidingViewController.anchorRightPeekAmount = 100.0; myWorkController.slidingViewController = self.slidingViewController; UITabBarController *tabBarController = [[UITabBarController alloc] init]; tabBarController.viewControllers = @[ self.slidingViewController, createNavController, currentWorkNavController]; </code></pre> <p>and I am setting the <strong>underRightViewController</strong> inside myWorkController</p> <pre><code> if (self.slidingViewController != nil) { UIViewController *underRightViewController = [[[UIViewController alloc] init] autorelease]; // configure under right view controller underRightViewController.view.layer.borderWidth = 0; underRightViewController.view.layer.backgroundColor = [UIColor colorWithWhite:0.9 alpha:1.0].CGColor; underRightViewController.view.layer.borderColor = [UIColor colorWithWhite:0.8 alpha:1.0].CGColor; underRightViewController.edgesForExtendedLayout = UIRectEdgeTop | UIRectEdgeBottom | UIRectEdgeRight; // don't go under the top view self.slidingViewController.underRightViewController = underRightViewController; } </code></pre> <p>1) First swipe works perfect but the second swipe breaks in ECSlidingViewController code 2) As I am using UINavigationController, when I try to change underRightViewController it fails at [oldUnderRightViewController removeFromParentViewController]; of ECSlidingViewController code</p> <p>Can some one please guide me what I am doing wrong or if this is possible with ECSlidingViewController</p> <p>Thanks in advance</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload