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

In order to cure this disease, he did not hesitate to go to court!

Author's note: In the elementary school Chine...

Beware! A new type of "epidemic investigation" scam is coming!

Editor's note: During the special period of e...

When a giraffe sleeps, where does it put its 2-meter-long neck?

Have you ever wondered what a sleeping giraffe lo...

From 0 to 20 million, the 3-year growth path of Get APP

1. Get the PMF of the app PMF, or product-market ...

Aipinche's sudden death: Internet entrepreneurship under the shadow of BAT

Aipinche recently announced that it would stop se...

Startup App, 4 Cold Start Methods from 0 to 1

When cold-starting , Internet products can be rou...

collect! 8 ways to get social media traffic!

Whether it is Internet e-commerce or traditional ...

LeEco vs Xiaomi: A battle is inevitable

LeTV held a "breathtaking" press confer...

The sun is scorching! What does a "reliable" sun umbrella look like?

The summer is hot, Couples often share an umbrell...

Advertising strategies of Xiaohongshu and Bilibili

Without further ado, let’s get straight to the po...