转载

[iOS] 模仿 iOS7 task switcher 的卡片动画

GCCardScrollView

Introduction

This is animation is imitate iOS7 task switcher animation, if you have more than 4 cards,it will reues card,and it can delete card

Gif

[iOS] 模仿 iOS7 task switcher 的卡片动画

how to use

1.add card scroll view

self.cardScrollView = [[CardScrollView alloc] initWithFrame:self.view.frame]; self.cardScrollView.cardDelegate = self; self.cardScrollView.cardDataSource = self; [self.view addSubview:self.cardScrollView];

2.update card when scrolling

- (void)updateCard:(UIView *)card withProgress:(CGFloat)progress direction:(CardMoveDirection)direction;

3.set cards number

- (NSInteger)numberOfCards;

4.reuse card

- (UIView *)cardReuseView:(UIView *)reuseView atIndex:(NSInteger)index;

5.delete card,this is optional

- (void)deleteCardWithIndex:(NSInteger)index;
原文  https://github.com/Yuzeyang/GCCardViewController
正文到此结束
Loading...