Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // SecondViewController.m
- // Радио СВЕТ
- //
- // Created by Bogdan Michalchuk on 11/10/14.
- // Copyright (c) 2014 Радио CBET. All rights reserved.
- //
- #import "SecondViewController.h"
- #import "ECSlidingViewController.h"
- #import "MenuViewController.h"
- #import "UIViewController+ECSlidingViewController.h"
- @interface SecondViewController ()
- @end
- @implementation SecondViewController
- @synthesize menuButton;
- - (void)viewDidLoad {
- [super viewDidLoad];
- // Do any additional setup after loading the view.
- //The Menu option codes
- 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"];
- }
- [self.view addGestureRecognizer:self.slidingViewController.panGesture];
- self.menuButton = [UIButton buttonWithType:UIButtonTypeCustom];
- menuButton.frame = CGRectMake(8, 10, 34, 24);
- [menuButton setBackgroundImage:[UIImage imageNamed:@"menuButton.png"] forState:UIControlStateNormal];
- [menuButton addTarget:self action:@selector(revealMenu:) forControlEvents:UIControlEventTouchUpInside];
- [self.view addSubview:self.menuButton];
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
- }
- /*
- #pragma mark - Navigation
- // In a storyboard-based application, you will often want to do a little preparation before navigation
- - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
- // Get the new view controller using [segue destinationViewController].
- // Pass the selected object to the new view controller.
- }
- */
- - (IBAction)revealMenu:(id)sender {
- [self.slidingViewController anchorTopViewTo:ECRight];
- }
- @end
Advertisement
Add Comment
Please, Sign In to add comment