I have a simple UITableView that I've added a UIButton to the Footer.
Similar to this:
self.btn =[UIButton buttonWithType:UIButtonTypeCustom];
self.btn.backgroundColor = darkPurple;
[self.btn setTitle:@"Submit" forState:UIControlStateNormal];
[self.btn addTarget:self action:@selector(btnTapped:) forControlEvents:UIControlEventTouchUpInside];
[self.btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
self.btn.frame=CGRectMake(0, 0, self.tableView.frame.size.width, 100);
self.btn.showsTouchWhenHighlighted = true;
self.tableView.tableFooterView = self.btn;
Sometimes when I get scrolled to the bottom of the TableView if it isn't completely settled the Button won't perform the action. Sometimes it will flash (showsTouchWhenHighlighted
) but I'll need to tap it again.
What am I missing here? I've tried solutions like this but it doesn't appear to work.
UIButton touch is delayed when in UIScrollView
I want to it process always, even if the scroll isn't settled and not delay.