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

Information flow advertising landing page planning methodology!

The 7 creative rules for information flow adverti...

Get the LaunchImage of the app

[[153741]] The management of LaunchImage is actua...

Understand the meaning of matrix rank and determinant in one article

As an engineering student, we have been using lin...

Apple launches Android migration app, leaving no room for Android

Beijing time, September 17th morning news, Apple ...

7 key points you must know when starting to operate Douyin

I have summarized and sorted out some universal a...

My skin is dry in winter, should I apply a facial mask every day?

My skin is dry in winter, should I apply a facial...

Which Zhejiang Mobile high bandwidth server rental company is the best?

Which Zhejiang Mobile high-bandwidth server renta...

Why is the Okolin electric toothbrush not worth buying?

Recently, there have been more and more publicity...

Rules for Juliang Qianchuan Advertising and Direct Broadcasting

What traffic dividends does Qianchuan Search have...