AFTabledCollectionView
AFTabledCollectionView copied to clipboard
how to select uicollectionviewcell in uitableviewcell
Thanks for sharing the project. I Want to select uicollectionviewcell in uitableviewcell and push to a new view. But didSelectRowAtIndexPath doesn't work in both uitableview and collectionview. How to fix it? I am new in apple developing, Looking forward to hearing from you soon.
Hmm, sounds tricky. I think this link should be helpful: http://stackoverflow.com/questions/19256996/uibutton-not-showing-highlight-on-tap-in-ios7
The touch model in iOS is more complex than you might think at first glance. Don't worry – everyone struggles with this at first (I still do sometimes!) and it just takes experimentation and practice. You'll get it!
I just was researching this for one of my projects.. Couldn't you implement collectionView didSelectItemAtIndexPath?
Example with the projects example in AFViewController.m:
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
NSArray *collectionViewArray = self.colorArray[[(AFIndexedCollectionView *)collectionView indexPath].item];
NSLog(@"selected color: %ld", (long)collectionViewArray[indexPath.item]);
}
Yeah, that would work. I think I misread the original question as being a problem that the callback wasn't being called (because of the touch model). The callback as @cjazz has it is :+1:
👍