NSScreencast Episode #110 Swipe to Reveal Redux
Swipe to Reveal Redux - NSScreencast
セルをスワイプしてactionする機能で
以前のやつで問題を指摘されたのでその解決
- challenging
- scroll view eating touches
- subclass of UIScrollView
- scroll view eating touches
- BSTapScrollView.h
- @optional
- scrollView touchesBegan
- scrollView touchesCancelled
- scrollView touchesEnded
- touchesMoved
- @optional
- set tap scroll view to BSTapScrollView class on xcode
- MailMessageCell
- change to IBOutlet BSTapScrollView *scrollView;
- add protocol
- self.scrollView.tapDelegate = self;
- MailMessageCell
- BSTapScrollViewDelegate
- setHighlighted animated
- touchesEnded
- indexPath = [self.tableView indexPathForCell:self];
- selectRowAtIndexPath scrollPosition:UITableViewScrollPositionNone
- problem
- タッチ時にMore, Deleteのラベルが透けて見える
- 他のセルを選択した時に閉じるタイミングでまた問題が出てくる
- 後ろのボタンのラベルをダイナミックに空文字にする方法
- repositionButtons
- if (self.highlighted || self.scrollView.contentOffset.x == 0)