Skip to content
프로젝트

소개

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

웹 및 앱 개발

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

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!

관련 프로젝트 살펴보기

불러오는 중…