twone twone -5 years ago 137
iOS Question

Panel sliding from the bottom

I want to implement panel, that by default appears from the bottom only by 1/4.
And when i tap on this part, or swipe it, it should roll out on full screen.

exactly what i want was implemented in this app

So what i tried already:
Making UIView and trying to apply tap and swipe gestures. UIView didn't catch it. But it caught touchesMoved, touchesEnded etc.
UITableView. Same.
Making UIViewController. Ended without any idea how to handle it to right way.

So any ideas or links are appreciated.
Thanks in advance.

Answer Source

Check PPRevealSideViewController, I think you can find what you need. When you tap on the new viewController you can change the Offset.


MainViewController *main = [[MainViewController alloc] init];
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
main = [storyboard instantiateViewControllerWithIdentifier:@"MainViewControllerr"];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:main];
_revealSideViewController = [[PPRevealSideViewController alloc] initWithRootViewController:nav];
_revealSideViewController.delegate = self;
self.window.rootViewController = _revealSideViewController;


    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    PoppedViewController *pvc = [storyboard instantiateViewControllerWithIdentifier:@"PoppedViewController"];
    [self.revealSideViewController pushViewController:pvc onDirection:PPRevealSideDirectionBottom withOffset:_offset animated:_animated completion:nil];


    UITapGestureRecognizer *gesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(getFullView)];
    gesture.delegate = self;
    [self.view addGestureRecognizer:gesture];

    [self.revealSideViewController changeOffset:0.0f forDirection:PPRevealSideDirectionLeft];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download