- Copy
KKScrollBannerView.handKKScrollBannerView.mto your project. - Set up in your views like this:
KKScrollBannerView *bannerView = [[KKScrollBannerView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 200)];
bannerView.dataSource = self;
[self.view addSubview:bannerView];
- Set up dataSource:
#pragma mark - DataSource
- (NSArray *)bannerViews {
UIView *view0 = [[UIView alloc] init];
UIView *view1 = [[UIView alloc] init];
UIView *view2 = [[UIView alloc] init];
...
return @[view0, view1, view2];
}
- You are good to go.
