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

多種風格的手勢滑動Cell

移動開發(fā)
MGSwipeTableCell是UITableViewCell的子類,用多種過渡方式展示可點擊的按鈕,該庫兼容所有不同的方式來創(chuàng)建UITableViewCell。

源碼簡介

MGSwipeTableCell是UITableViewCell的子類,用多種過渡方式展示可點擊的按鈕,該庫兼容所有不同的方式來創(chuàng)建UITableViewCell。
源碼運行截圖

源碼片段

  1. #pragma mark Trigger Actions 
  2.   
  3. -(void) handleClick: (id) sender fromExpansion:(BOOL) fromExpansion 
  4.     bool autoHide = false
  5. #pragma clang diagnostic push 
  6. #pragma clang diagnostic ignored "-Wundeclared-selector" 
  7.     if ([sender respondsToSelector:@selector(callMGSwipeConvenienceCallback:)]) { 
  8.         //call convenience block callback if exits (usage of MGSwipeButton class is not compulsory) 
  9.         autoHide = [sender performSelector:@selector(callMGSwipeConvenienceCallback:) withObject:_cell]; 
  10.     } 
  11. #pragma clang diagnostic pop 
  12.       
  13.     if (_cell.delegate && [_cell.delegate respondsToSelector:@selector(swipeTableCell:tappedButtonAtIndex:direction:fromExpansion:)]) { 
  14.         NSInteger index = [_buttons indexOfObject:sender]; 
  15.         if (!_fromLeft) { 
  16.             index = _buttons.count - index - 1//right buttons are reversed 
  17.         } 
  18.         autoHide|= [_cell.delegate swipeTableCell:_cell tappedButtonAtIndex:index direction:_fromLeft ? MGSwipeDirectionLeftToRight : MGSwipeDirectionRightToLeft fromExpansion:fromExpansion]; 
  19.     } 
  20.       
  21.     if (fromExpansion) { 
  22.         _expandedButton = nil; 
  23.         _cell.swipeOffset = 0
  24.     } 
  25.     else if (autoHide) { 
  26.         [_cell hideSwipeAnimated:YES]; 
  27.     } 
  28.   

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

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

2013-06-20 10:50:51

Objective-CiOS左右滑動手勢

2010-01-28 14:57:36

Android滑動手勢

2011-06-28 09:53:43

iPhone諾基亞N9

2021-05-29 20:47:00

微軟Windows 10Windows

2015-07-23 15:28:50

celluitableview

2013-12-08 22:02:24

手勢交互交互設(shè)計交互體驗

2015-07-17 10:51:01

滑動菜單

2013-07-10 11:32:57

編碼風格

2017-08-28 15:00:20

軟件系統(tǒng)架構(gòu)風格

2010-04-01 09:11:05

Oracle函數(shù)

2024-06-21 08:27:21

ViewViewGroup參數(shù)

2013-07-18 18:06:53

UITableview

2014-12-31 16:48:43

Touch touchevent多點觸摸

2024-10-08 05:00:00

PEP 8編碼Python

2015-03-23 17:43:31

transitionViewControl

2022-02-18 08:26:12

TopK數(shù)組面試題

2015-07-22 10:34:59

手勢密碼源碼

2010-01-08 12:03:42

ibmdwREST

2020-09-01 07:38:29

編碼開發(fā)代碼
點贊
收藏

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