// // FirstTopViewController.m // ECSlidingViewController // // Created by Michael Enriquez on 1/23/12. // Copyright (c) 2012 EdgeCase. All rights reserved. // #import "FirstTopViewController.h" @implementation FirstTopViewController - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; // shadowPath, shadowOffset, and rotation is handled by ECSlidingViewController. // You just need to set the opacity, radius, and color. self.view.layer.shadowOpacity = 0.75f; self.view.layer.shadowRadius = 10.0f; self.view.layer.shadowColor = [UIColor blackColor].CGColor; if (![self.slidingViewController.underLeftViewController isKindOfClass:[MenuViewController class]]) { self.slidingViewController.underLeftViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"Menu"]; } if (![self.slidingViewController.underRightViewController isKindOfClass:[UnderRightViewController class]]) { self.slidingViewController.underRightViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"UnderRight"]; } [self.view addGestureRecognizer:self.slidingViewController.panGesture]; } - (IBAction)revealMenu:(id)sender { [self.slidingViewController anchorTopViewTo:ECRight]; } - (IBAction)revealUnderRight:(id)sender { [self.slidingViewController anchorTopViewTo:ECLeft]; } @end