0

I want to put a hidden segment control on the top of UITableView, like search bar in iBooks. Then I found Creating a hidden UISegmentedControl in a UITableView. By implementing UIScrollViewDelegate methods:

- (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView
- (void)scrollViewDidScroll:(UIScrollView *)scrollView

I can show and hide the hidden segment control. But this segment control cannot respond to touches. Just the tableview cover the top area again, like the original post.

So I want to known how to make the segment control can react to touch. I found something like:

scrollView.userInteractionEnabled = YES;
scrollView.canCancelContentTouches = NO;
scrollView.delaysContentTouches = NO;

but didn't work.(I use self.tableView.userInteraction...)

Anyone give me a hand?

Community
  • 1
  • 1
wyp
  • 869
  • 3
  • 11
  • 23

0 Answers0