YQCardView 1.0.1

YQCardView 1.0.1

测试已测试
语言语言 Obj-CObjective C
许可 MIT
发布上次发布2015年9月

yuyedaidao 维护。



  • 作者:
  • yuyedaidao

个人项目中用于展示当前头像,当然也可用于其他目的。

获取

pod 'YQCardView'

使用

YQCardView *cardView = [[YQCardView alloc] initWithVisibleCount:3 registerInfo:@{@"A":[UICollectionViewCell class]}];
[self.view addSubview:cardView];
cardView.frame = CGRectMake(0, 0, self.view.bounds.size.width, 140);
//    cardView.frame = self.view.bounds;
cardView.center = self.view.center;

[cardView setItemNumberBlock:^NSInteger{
    return 11;
}];
__weak typeof(cardView) weakCardView = cardView;
[cardView setCellForItemBlock:^UICollectionViewCell *(NSIndexPath *indexPath) {
    UICollectionViewCell *cell = [weakCardView dequeueReusableCellWithReuseIdentifier:@"A" forIndexPath:indexPath];
    cell.backgroundColor = [UIColor colorWithRed:arc4random()%255/255.0 green:arc4random()%255/255.0 blue:arc4random()%255/255.0 alpha:1];
    return cell;
}];