TKPagedScrollView Class Reference
Inherits from | UIView |
Declared in | TKPagedScrollView.h TKPagedScrollView.m |
Overview
TKPagedScrollView
a scroll view container that holds a UIScrollView
. The view acts like a UIScrollView
that has pages of length longer than the actual scroll view frame.
Tasks
-
– initWithFrame:direction:
-
scrollDirection
property -
animatingPages
property -
scrollView
property -
pages
property -
currentPage
property -
delegate
property -
– scrollToPreviousPage
-
– scrollToNextPage
-
– scrollToPage:animated:
-
– updatePagesLayout
Properties
animatingPages
A flag that indicates if the current page is changing.
@property (nonatomic, readonly) BOOL animatingPages
Declared In
TKPagedScrollView.h
currentPage
The current page
@property (nonatomic, assign) NSInteger currentPage
Declared In
TKPagedScrollView.h
delegate
The delegate of the paged-scroll-view object.
@property (nonatomic, weak) id<TKPagedScrollViewDelegate> delegate
Declared In
TKPagedScrollView.h
pages
An array of views that are laid out to form the scroll view. The page size of each view is determined based on the size of the view.
@property (nonatomic, strong) NSArray *pages
Declared In
TKPagedScrollView.h
scrollDirection
The direction a TKPagedScrollView
would layout pages in.
@property (nonatomic, readonly) TKPageScrollDirection scrollDirection
Declared In
TKPagedScrollView.h
scrollView
Access to the underlying UIScrollView
. Do not take the UIScrollView
’s delegate.
@property (nonatomic, strong) UIScrollView *scrollView
Declared In
TKPagedScrollView.h
Instance Methods
initWithFrame:direction:
Initializes and returns a paged scroll view.
- (id)initWithFrame:(CGRect)frame direction:(TKPageScrollDirection)direction
Parameters
- frame
The frame for the view.
- direction
The direction that scroll view will scroll.
Return Value
A newly created paged scroll view or nil.
Declared In
TKPagedScrollView.h
scrollToPage:animated:
Scroll to a specific page.
- (void)scrollToPage:(NSInteger)page animated:(BOOL)animated
Parameters
- page
The page that will become the current one.
- animated
Whether the change is animated or not.
Declared In
TKPagedScrollView.h
scrollToPreviousPage
Scroll to the previous page.
- (void)scrollToPreviousPage
Declared In
TKPagedScrollView.h
updatePagesLayout
Resets the layout of the pages.
- (void)updatePagesLayout
Declared In
TKPagedScrollView.h