简体   繁体   中英

AQGridView cell need to be tapped twice to trigger didSelectItem

I'm using AQGridView for displaying a TableView in grid format.

I've a problem that, randomly, the GridCell needs to be tapped twice to trigger the

didSelectItem

method.

On the first tap the cell highlights itself, but no didSelectItem method is called. On the second tap the method is called.

Any ideas?

The Problem occurs probably only, when you reselect the previous selected GridCell. So you have to add in your viewDidAppear the following Statement:

[self.gridView deselectItemAtIndex:self.gridView.indexOfSelectedItem animated:YES];

您也可以只实现gridView:willSelectItemAtIndex ,并返回NSNotFound这样就不会选择任何内容。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM