A lightweight UIScrollView block-driven subclass for easily create multiple pages with embedded UIViews in Objective-C。
将AFScrollView导入到您的类中
#import "AFScrollView.h"
使用-initWithFrame:andNumberOfPages
初始化类。
AFScrollView *scrollView = [[AFScrollView alloc]initWithFrame:self.view.bounds andNumberOfPages:5];
为了配置每个页面,每个页面都是一个UIView,调用块-configureViewAtIndexWithCompletion:
[scrollView configureViewAtIndexWithCompletion:^(UIView *view, NSInteger index, BOOL success) {
//Configure here each page
//Every page have a UIView embedded
//So, in order to add objects, call [view addSubview:element];
//The index var will retreive the current index
}];
Made by Alvaro Franco. 如果您有任何问题,请随时给我写信 [email protected]