Skip to content

gianlucatursi/GTScrollViewController

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GTScrollViewController

You need a table but with the dynamic view like Facebook home?

GTScrollView allows you to dynamically add unlimited views. Every view will be placed correctly in order after the last view added.

image

Usage

Include in your project the class GTScrollViewController.h and GTScrollViewController.m and import:

#import "GTScrollViewController.h"

Now create your GTScrollViewController and add your custom view:

GTScrollViewController *scroller = [[GTScrollViewController alloc] init:nil]; 

[scroller addViews:[[NSArray alloc] initWithObjects:first,second,... nil]]; 

or init GTScrollViewController with the NSArray of your custom view:

GTScrollViewController *scroller = [[GTScrollViewController alloc] init: [[NSArray alloc] initWithObjects:first,second,... nil]];

[scroller addViews:[[NSArray alloc] initWithObjects:first,second,... nil]]; 

or init GTScrollViewController with the NSArray of your custom view:

GTScrollViewController *scroller = [[GTScrollViewController alloc] init: [[NSArray alloc] initWithObjects:first,second,... nil]];

That's it, really!

Feature

For now, these methods are available:

-(id)init:(NSArray *)views;
-(id)init:(NSArray *)views andPaddingTopBottom:(float)padTB;
-(void)setBackgroundImage:(UIImage*) image;
-(void)addView:(UIView *)view;
-(void)addViews:(NSArray *)views;
-(void)setShadowRadius:(float)sr shadowOpacity:(float)so andCornerRadius:(float)cr;

Init method passing array of view and padding

-(id)init:(NSArray *)views andPaddingTopBottom:(float)padTB;

Set the background image

-(void)setBackgroundImage:(UIImage*) image;

Add single view

-(void)addView:(UIView *)view;

Add array of view

-(void)addViews:(NSArray *)views;

Set shadow and corner property

-(void)setShadowRadius:(float)sr shadowOpacity:(float)so andCornerRadius:(float)cr;

Restore default value for shadow and radius

-(void)restoreShadowRadiusOpacityAndCornerRadius;

Dependencies

QuartzCore framework is require.

Demo

Play with it and ask me whatever you want.

Contact

Gianluca Tursi

About

GTScrollView allows you to add dynamically and unlimited views.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published