redribben

SecondViewController

Nov 11th, 2014
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //
  2. //  SecondViewController.m
  3. //  Радио СВЕТ
  4. //
  5. //  Created by Bogdan Michalchuk on 11/10/14.
  6. //  Copyright (c) 2014 Радио CBET. All rights reserved.
  7. //
  8.  
  9. #import "SecondViewController.h"
  10. #import "ECSlidingViewController.h"
  11. #import "MenuViewController.h"
  12. #import "UIViewController+ECSlidingViewController.h"
  13.  
  14. @interface SecondViewController ()
  15.  
  16. @end
  17.  
  18. @implementation SecondViewController
  19.  
  20. @synthesize menuButton;
  21.  
  22. - (void)viewDidLoad {
  23.     [super viewDidLoad];
  24.     // Do any additional setup after loading the view.
  25.    
  26.     //The Menu option codes
  27.     self.view.layer.shadowOpacity = 0.75f;
  28.     self.view.layer.shadowRadius = 10.0f;
  29.     self.view.layer.shadowColor = [UIColor blackColor].CGColor;
  30.    
  31.     if (![self.slidingViewController.underLeftViewController isKindOfClass:[MenuViewController class]]) {
  32.         self.slidingViewController.underLeftViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"Menu"];
  33.     }
  34.    
  35.     [self.view addGestureRecognizer:self.slidingViewController.panGesture];
  36.    
  37.     self.menuButton = [UIButton buttonWithType:UIButtonTypeCustom];
  38.     menuButton.frame = CGRectMake(8, 10, 34, 24);
  39.     [menuButton setBackgroundImage:[UIImage imageNamed:@"menuButton.png"] forState:UIControlStateNormal];
  40.     [menuButton addTarget:self action:@selector(revealMenu:) forControlEvents:UIControlEventTouchUpInside];
  41.    
  42.     [self.view addSubview:self.menuButton];
  43.    
  44. }
  45.  
  46.  
  47. - (void)didReceiveMemoryWarning {
  48.     [super didReceiveMemoryWarning];
  49.     // Dispose of any resources that can be recreated.
  50. }
  51.  
  52. /*
  53. #pragma mark - Navigation
  54.  
  55. // In a storyboard-based application, you will often want to do a little preparation before navigation
  56. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  57.     // Get the new view controller using [segue destinationViewController].
  58.     // Pass the selected object to the new view controller.
  59. }
  60. */
  61.  
  62. - (IBAction)revealMenu:(id)sender {
  63.     [self.slidingViewController anchorTopViewTo:ECRight];
  64. }
  65.  
  66.  
  67. @end
Advertisement
Add Comment
Please, Sign In to add comment