Coder Social home page Coder Social logo

gtscrollviewcontroller's Introduction

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

gtscrollviewcontroller's People

Contributors

gianlucatursi avatar yakubbaev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.