siweidw / GCPagedScrollView

Simple UIScrollView subclass that automatically handle UIPageControl and paged content.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GCPagedScrollView

Simple UIScrollView subclass that automatically handle UIPageControl and paged content.

You can have a paged UIScrollView with UIPageControl in almost no time.

Usage

(See the demo project included)

You simply allocate the scroll view like you would normally, but instead of adding subviews directly, you add content subviews with one of these methods.

- (void) addContentSubview:(UIView*) view;
- (void) addContentSubview:(UIView*) view atIndex:(NSUInteger) index;
- (void) addContentSubviewsFromArray:(NSArray*) contentViews;

The views will be placed and managed automatically.

You can remove content views with these methods.

- (void) removeContentSubview:(UIView*) view;
- (void) removeContentSubviewAtIndex:(NSUInteger) index;
- (void) removeAllContentSubviews;

About

Simple UIScrollView subclass that automatically handle UIPageControl and paged content.

License:Other