Skip to content

A lightweight UIScrollView block-driven subclass for easily create multiple pages with embeeded UIViews in Objective-C

License

Notifications You must be signed in to change notification settings

AlvaroFranco/AFScrollView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AFScrollView

A lightweight UIScrollView block-driven subclass for easily create multiple pages with embedded UIViews in Objective-C.

##Preview

alt text

##Cocoapods

AFScrollView is on CocoaPods, so you can get the pod by adding this line to your Podfile

pod 'AFScrollView', '~> 1.0'

If not, just import these files to your project:

AFScrollView.h
AFScrollView.m

##Usage

Import AFScrollView to your class

#import "AFScrollView.h"

Init the class with -initWithFrame:andNumberOfPages.

AFScrollView *scrollView = [[AFScrollView alloc]initWithFrame:self.view.bounds andNumberOfPages:5];

In order to configure each page, which will be an UIView, call the block -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
}];

##Author

Made by Alvaro Franco. If you have any question, feel free to drop me a line at alvarofrancoayala@gmail.com

About

A lightweight UIScrollView block-driven subclass for easily create multiple pages with embeeded UIViews in Objective-C

Resources

License

Stars

Watchers

Forks

Packages

No packages published