-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to select uicollectionviewcell in uitableviewcell #13
Comments
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 👍 |
👍 |
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.
The text was updated successfully, but these errors were encountered: