HAPaperViewController icon indicating copy to clipboard operation
HAPaperViewController copied to clipboard

ScrollView enabled/disabled in different state

Open bluebookbi opened this issue 10 years ago • 0 comments

Hello, Hebert! :) First, I really admired you created this amazing project for me and others. I created custom cell, each cell has vertical scrollView as whole view. When I'm at main page, I could click any single cell then it shows out the full-screen cell. Problem comes when I pinch the cell to go back to the main page, which I couldn't tap it to let it shown anymore. Hope to get your help soon. Thank you very much. Some of my applied code is shown below.

// ConanCell.m - my custom cell

  • (void)awakeFromNib{ self.smallView.layer.cornerRadius = 4; self.scrollView.userInteractionEnabled = NO; self.scrollView.scrollEnabled = NO; [self.contentView addGestureRecognizer:self.scrollView.panGestureRecognizer]; }

// HASmallCollectionViewController.m

  • (void)collectionView:(UICollectionView )collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { ConanCell *cell = (ConanCell)[collectionView cellForItemAtIndexPath:indexPath]; cell.scrollView.userInteractionEnabled = YES; cell.scrollView.scrollEnabled = YES; NSLog(@"Selected at %d",(int)indexPath.row);

    UIViewController *vc = [self nextViewControllerAtPoint:CGPointZero]; [self.navigationController pushViewController:vc animated:YES]; }

// HATransitionController.m

  • (void)endInteractionWithSuccess:(BOOL)success { ... else if ((self.transitionLayout.transitionProgress > 0.25) && success) { [self.collectionView finishInteractiveTransition]; [self.context finishInteractiveTransition]; ConanCell *conan = [ConanCell new]; conan.scrollView.userInteractionEnabled = NO; NSLog(@"Back"); } ... }

bluebookbi avatar Jul 08 '15 05:07 bluebookbi