Beautiful menu animation

Beautiful menu animation

Source code introduction

You can add beautiful animated content to the app's menu, customize the icon and title, and design cells and layouts according to your preferences.
Source code running screenshot

Source code snippet:

  1. - (IBAction)presentMenuButtonTapped:(UIBarButtonItem *)sender {
  2. // init YALContextMenuTableView tableView  
  3. if (!self.contextMenuTableView) {
  4. self.contextMenuTableView = [[YALContextMenuTableView alloc]initWithTableViewDelegateDataSource:self];
  5. self.contextMenuTableView.animationDuration = 0.15 ;
  6. //optional - implement custom YALContextMenuTableView custom protocol  
  7. self.contextMenuTableView.yalDelegate = self;
  8.           
  9. //register nib  
  10. UINib *cellNib = [UINib nibWithNibName:@ "ContextMenuCell" bundle:nil];
  11. [self.contextMenuTableView registerNib:cellNib forCellReuseIdentifier:menuCellIdentifier];
  12. }
  13.   
  14. // it is better to use this method only for proper animation  
  15. [self.contextMenuTableView showInView:self.navigationController.view withEdgeInsets:UIEdgeInsetsZero animated:YES];
  16. }
  17.   
  18. #pragma mark - Local methods
  19.   
  20. - ( void )initiateMenuOptions {
  21. self.menuTitles = @[@ "" ,
  22. @ "Send message" ,
  23. @ "Like profile" ,
  24. @ "Add to friends" ,
  25. @ "Add to favorites" ,
  26. @ "Block user" ];
  27.   
  28. self.menuIcons = @[[UIImage imageNamed:@ "Icnclose" ],
  29. [UIImage imageNamed:@ "SendMessageIcn" ],
  30. [UIImage imageNamed:@ "LikeIcn" ],
  31. [UIImage imageNamed:@ "AddToFriendsIcn" ],
  32. [UIImage imageNamed:@ "AddToFavouritesIcn" ],
  33. [UIImage imageNamed:@ "BlockUserIcn" ]];
  34. }

Source code download: http://download..com/data/1984622

<<:  Douban Photo Album Collection

>>:  OS X, iOS and Linux all have more vulnerabilities than Windows

Recommend

Apple, just acquire ARM!

The tech industry's M&A season has arrive...

How to analyze the effectiveness of promotion channels?

A complete channel process is off-site channel - ...

Keep players addicted: 8 tips to improve the virality of mobile games

Many people may know that Nguyen Ha Dong, the dev...

How to choose the right shoes for running?

When running, a good pair of sports shoes is very...