自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

漂亮的菜單動畫

移動開發(fā)
可以為app的菜單添加漂亮的動畫內(nèi)容,可以自定義icon和title,可根據(jù)自己喜好設(shè)計單元格和布局。

源碼簡介

可以為app的菜單添加漂亮的動畫內(nèi)容,可以自定義icon和title,可根據(jù)自己喜好設(shè)計單元格和布局。
源碼運行截圖

源碼片段:

  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. #pragma mark - Local methods 
  18.   
  19. - (void)initiateMenuOptions { 
  20.     self.menuTitles = @[@""
  21.                         @"Send message"
  22.                         @"Like profile"
  23.                         @"Add to friends"
  24.                         @"Add to favourites"
  25.                         @"Block user"]; 
  26.   
  27.     self.menuIcons = @[[UIImage imageNamed:@"Icnclose"], 
  28.                        [UIImage imageNamed:@"SendMessageIcn"], 
  29.                        [UIImage imageNamed:@"LikeIcn"], 
  30.                        [UIImage imageNamed:@"AddToFriendsIcn"], 
  31.                        [UIImage imageNamed:@"AddToFavouritesIcn"], 
  32.                        [UIImage imageNamed:@"BlockUserIcn"]]; 

源碼下載:http://down.51cto.com/data/1984622

責任編輯:chenqingxiang 來源: 網(wǎng)絡(luò)整理
相關(guān)推薦

2012-09-13 09:24:31

CSSJSjQ

2022-10-30 21:11:10

ManimPython動畫

2024-07-01 08:19:56

2022-03-29 09:33:34

LinuxShell命令

2014-04-29 10:39:27

CSS3JavaScript

2011-05-26 09:39:53

程序

2020-09-17 16:00:03

Python 開發(fā)編程語言

2017-04-06 22:33:43

with磁盤數(shù)據(jù)

2021-06-10 10:26:03

PythonGUI軟件包

2017-08-17 12:03:58

前端CSS加載

2013-11-21 11:33:12

openSUSE 13LinuxopenSUSE

2016-11-25 13:50:15

React組件SFC

2020-07-10 15:41:41

Python代碼編程語言

2018-11-06 12:22:18

排序算法代碼

2023-05-15 20:08:04

Linux字體

2020-06-30 09:38:14

Linux發(fā)行版操作系統(tǒng)

2019-09-17 14:31:52

JSJavaScript前端

2010-10-28 11:25:34

應(yīng)聘

2013-08-06 10:32:21

為知筆記

2010-10-20 11:12:40

應(yīng)聘
點贊
收藏

51CTO技術(shù)棧公眾號