Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat is the best way/design to handle touches as well UICollectionViewDelegate methods
    primarykey
    data
    text
    <p>I have functioning UICollectionView controller with my own UICollectionView subclass and cells etc.</p> <p>1)Now I decided to add slideView as explained in <a href="http://www.raywenderlich.com/32054/how-to-create-a-slide-out-navigation-like-facebook-and-path" rel="nofollow">http://www.raywenderlich.com/32054/how-to-create-a-slide-out-navigation-like-facebook-and-path</a> behind by own collectionview controller. 2) Then I wasnt happy enough since it doesnt give me "peak-inside" feel as FaceBook app on iOS</p> <p>3) So then I modified code and handle touches in my own collectionView subclass. After going thru this site and some initial struggle I can now get the same feel like FB </p> <p>4) But in the process of handling touches I lost the UICollectionViewDelegate didSelectItemAtIndePath. They never get called because of touch.</p> <p>5) So I added tapGesture on collectionView in my storyboard and hooked everything up and made explicit call </p> <pre><code>- (IBAction)selectCellWithSingleTap:(UITapGestureRecognizer *)sender { NSLog(@"SELECT"); CGPoint tapLocation = [sender locationInView:self.collectionView]; NSIndexPath *indexPath = [self.collectionView indexPathForItemAtPoint:tapLocation]; if (indexPath) { [self collectionView:self.collectionView didSelectItemAtIndexPath:indexPath]; } } </code></pre> <p>1)Now IS this the correct approach? 2)If not what is the better design? 3)I also like to know what this method does selectItemAtIndexPath:animated:scrollPosition: in UICollectionView could I use this one?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload