Douban Photo Album Collection

Douban Photo Album Collection

Source code introduction

The source code of Douban Photo Collection comes from Tonny&Sunm. You can refer to it and use it after modification, but the interface cannot be used casually.
Source code running screenshot

Source code snippet:

  1. - (IBAction)showPhotosInAlbum:(UISwipeGestureRecognizer *)gesture {
  2. if (IsShowingCategory) return ;
  3.       
  4. CGPoint point = [gesture locationInView:_tableView];
  5. NSIndexPath *selectedIndexPath = [_tableView indexPathForRowAtPoint:point];
  6. if (!selectedIndexPath) return ;
  7.       
  8. NSUInteger row = selectedIndexPath.row;
  9.       
  10. [self hidePaperIndicator];
  11.       
  12. DAPhotoWallViewController *vc = (DAPhotoWallViewController *)[self.storyboard instantiateViewControllerWithIdentifier:@ "DAPhotoWallViewController" ];
  13.       
  14. NSDictionary *dic = _dataSource[@ "albums" ][row];
  15.       
  16. vc.albumDic = dic;
  17. NSArray *doubanCategory = [_appData valueForKeyPath:@ "cg_all" ];
  18. vc.canNotGotoUserAlbum = (_seletedCategory == doubanCategory.count);
  19.       
  20. CGFloat offset = [_tableView rectForRowAtIndexPath:selectedIndexPath].origin.y-[_tableView contentOffset].y;
  21. vc.paperIndicatorOffset = offset;
  22.   
  23. _lastSelectedRow = row;
  24. ////  
  25. UITableViewCell *cell = [_tableView cellForRowAtIndexPath:selectedIndexPath];
  26. UIView *view = [cell.contentView viewWithTag: 4 ];
  27. [UIView animateWithDuration: 0.3  
  28. animations:^{
  29. view.alpha = 1 ;
  30. }completion:^(BOOL finished) {
  31. [self.navigationController pushViewController:vc animated:YES];
  32. }];
  33. }

Source code link: http://download..com/data/1984620

<<:  Row-based waterfall view

>>:  Beautiful menu animation

Recommend

Zheng Xiangzhou-New Business Model Complete Works Value 12980

Zheng Xiangzhou-New Business Model Complete Works...

Why does Apple Maps suck?

At the WWDC 2014 conference, Apple brought iOS 8, ...

How to build a brand? Brand building methodology!

Without a brand, your product will be trapped in ...

Want to do brand marketing without a prototype? Stop kidding!

As a brand, if you want to enter the hearts of us...

Will native applications be replaced by web applications and new browsers?

A common refrain about the future of mobile is th...