sss

SSStackedPageView

Stacked Views paged on top of each other, inspired by iOS 7 Reminders and iOS 7 Passport

Showing:

Popularity

Downloads/wk

0

GitHub Stars

278

Maintenance

Last Commit

4yrs ago

Contributors

2

Package

Dependencies

0

License

MIT

Categories

Readme

SSStackedPageView

THIS PROJECT IS CURRENTLY NOT UPDATED, PLEASE SUBMIT PULL REQUESTS FOR ANY BUGS

Inspired by Passbook App and Reminders App for iOS 7, this is designed to have a stacked page view that uses reusable pages for efficiency. Easily scroll through UIImageViews, UIViews or your custom View with this one do-it-all class.

SSStackedPageView uses a scroll view to manage through your large list of views. By either selecting or dragging the view up, you divide the stack and highlight that view. Each view is customized to the length of the SSStackedPageView. For efficiency, I make use of a reusable array of pages so that scrolling is fast and beautiful.

####Implementation:

This class has the delegate SSStackedViewDelegate that has the following methods:

///method for setting the current page at the index
- (UIView*)stackView:(SSStackedPageView *)stackView pageForIndex:(NSInteger)index;

///total number of pages to present in the stack
- (NSInteger)numberOfPagesForStackView:(SSStackedPageView *)stackView;

///handler for when a page is selected
- (void)stackView:(SSStackedPageView *)stackView selectedPageAtIndex:(NSInteger) index;

All three are required to create the stacked view. The first stackView:pageForIndex is most similar to tableView:rowForIndexPath: in that you'll want to presen tthe view that will be presented for that index. Next is the somewhat trivial numberOfPagesForStackView: which simply informs the StackedPageView how many elements to expect (and how many times stackView:pageForIndex is called).

Lastly, we have stackView:selectedPageAtIndex: method which will be your handler for when the page is selected.

Known Bugs:

  • Rotation brings odd results when pages are reused. Please Fork and Pull request if you find a solution or other bugs.

####Installation:

It's a CocoaPod! You have the choice to fork/clone the project, or you install via Podfile:

pod 'SSStackedPageView', '~> 0.0'

Thanks, and Enjoy!

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial