源码简介
豆瓣相册精选集的源码,来自Tonny&Sunm,可以参考,修改后使用,但界面不得随便使用。
源码运行截图
源码片段:
- - (IBAction)showPhotosInAlbum:(UISwipeGestureRecognizer *)gesture {
- if (IsShowingCategory) return;
- CGPoint point = [gesture locationInView:_tableView];
- NSIndexPath *selectedIndexPath = [_tableView indexPathForRowAtPoint:point];
- if (!selectedIndexPath) return;
- NSUInteger row = selectedIndexPath.row;
- [self hidePaperIndicator];
- DAPhotoWallViewController *vc = (DAPhotoWallViewController *)[self.storyboard instantiateViewControllerWithIdentifier:@"DAPhotoWallViewController"];
- NSDictionary *dic = _dataSource[@"albums"][row];
- vc.albumDic = dic;
- NSArray *doubanCategory = [_appData valueForKeyPath:@"cg_all"];
- vc.canNotGotoUserAlbum = (_seletedCategory == doubanCategory.count);
- CGFloat offset = [_tableView rectForRowAtIndexPath:selectedIndexPath].origin.y-[_tableView contentOffset].y;
- vc.paperIndicatorOffset = offset;
- _lastSelectedRow = row;
- ////
- UITableViewCell *cell = [_tableView cellForRowAtIndexPath:selectedIndexPath];
- UIView *view = [cell.contentView viewWithTag:4];
- [UIView animateWithDuration:0.3
- animations:^{
- view.alpha = 1;
- }completion:^(BOOL finished) {
- [self.navigationController pushViewController:vc animated:YES];
- }];
- }