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

How lazy were the ancients? Just look at their handwriting.

How lazy were the ancients? Just look at their ha...

Winter health guide for diabetics

As the weather turns cold, the cold winter is com...

How does Baidu charge for paid ranking?

Baidu bidding is paid per click. If this happens,...

Can't eat before colonoscopy? You can eat this

Author: Lv Zemin Han Many people have had the exp...

How to make users addicted to your product? 5 steps!

"Information overload" is the current s...

Do plants know math? The magical Fibonacci sequence

Editor's note: Plants occupy a very important...

It’s just myopia, how come the retina is detached?

Mixed Knowledge Specially designed to cure confus...