mirror of
https://github.com/zhigang1992/ECSlidingViewController.git
synced 2026-03-29 00:18:36 +08:00
- Instead of calling anchorTopView:animations:onComplete: with nil blocks, you can just call anchorTopView:
33 lines
913 B
Objective-C
33 lines
913 B
Objective-C
//
|
|
// SecondTopViewController.m
|
|
// ECSlidingViewController
|
|
//
|
|
// Created by Michael Enriquez on 1/23/12.
|
|
// Copyright (c) 2012 EdgeCase. All rights reserved.
|
|
//
|
|
|
|
#import "SecondTopViewController.h"
|
|
|
|
@implementation SecondTopViewController
|
|
|
|
- (void)viewWillAppear:(BOOL)animated
|
|
{
|
|
[super viewWillAppear:animated];
|
|
|
|
if (![self.slidingViewController.underLeftViewController isKindOfClass:[MenuViewController class]]) {
|
|
self.slidingViewController.underLeftViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"Menu"];
|
|
}
|
|
self.slidingViewController.underRightViewController = nil;
|
|
self.slidingViewController.anchorLeftPeekAmount = 0;
|
|
self.slidingViewController.anchorLeftRevealAmount = 0;
|
|
|
|
[self.view addGestureRecognizer:self.slidingViewController.panGesture];
|
|
}
|
|
|
|
- (IBAction)revealMenu:(id)sender
|
|
{
|
|
[self.slidingViewController anchorTopViewTo:ECRight];
|
|
}
|
|
|
|
@end
|