1.3.3
More bug fixes related to orientation change.
More performance optimzations.
More public interfaces.
1.3.2
Major performance optimization, runs at 60fps most of the time.
1.3.0
Paper-like zooming 2 pages at once (side-by-side)
Lots of stability bugs fixed
Many compile-time customization options are converted to runtime ones
2 more delegate methods
Different auto open book & page behavior
1.1.2
Support iOS 4.3
Option for custom aspect ratio
More public interfaces
1.1.1
Minor bug fix
1.1
Support iPhone
1.0
Initial Release, fully functional
Book/cover view mode, book list, book views
Pepper/3D view mode, Pepper list, Pepper/3D views
Fullscreen/detail view mode, page list, page/fullscreen/detail views
Zoom into 1 page at a time
enableOneSideZoom = YES;
Zoom into 2 pages at a time (landscape only)
enableOneSideZoom = NO;
wrapper UIViews, controlled by PepperVC
content UIViews, to be
provided via datasource protocol (PPScrollListViewControllerDataSource)
UIViews reuse
Both wrapper views and content views are constantly being reused automatically by PepperUI library.
The reused views are delivered by the datasource protocol in reusableView:(UIView*)contentView parameter.
reload
Destroy all views and reload PepperUI.
- (void)reload
Parameters
Nil
Return Value
Nil
Discussion
All wrapper & content views in PepperUI will be destroyed, including reusable views.
PepperUI will switch to book list after reloading.
Availability
Available in version 1.0 and later.
Declared In
PPPepperViewController.h
isPepperView
Check whether the current view mode is Pepper/3d mode.
- (BOOL)isPepperView
Parameters
Nil
Return Value
Return YES if the current view mode is pepper/3d. Return NO otherwise.
Discussion
This function should not be called during a transition/animation, unexpected value might be return.
Availability
Available in version 1.2.0 and later.
Declared In
PPPepperViewController.h
getCurrentBookIndex
Get the current index of the book in the centered or being opened.
- (int)getCurrentBookIndex
Parameters
Nil
Return Value
The current index of the book in the centered or being opened
Discussion
This function should not be called when user is swiping through the book list.
Use didScrollWithBookIndex delegate method if you need the intermediate position.
Availability
Available in version 1.2.0 and later.
Declared In
PPPepperViewController.h
hasBookInBookScrollView:
Check whether a view is being allocated for the given bookIndex in book list.
- (BOOL)hasBookInBookScrollView:(int)bookIndex
Parameters
bookIndex
The index of the book to be checked.
Return Value
Return YES if there is a view being allocated for the given bookIndex.
Discussion
This function should not be called when the current view mode is not book view.
PepperUI is using reuse concept similar to a UITableView. Therefore, only a limited number of views is allocated in memory.
When a book is not being allocated in memory, NO value is returned.
Availability
Available in version 1.3.0 and later.
Declared In
PPPepperViewController.h
openCurrentBookAtPageIndex:
Open the current book in focus at a given page index.
- (void)openCurrentBookAtPageIndex:(int)pageIndex
Parameters
pageIndex
The index of the left/even page to be opened.
When a right/odd pageIndex is given, it will be converted to the respective even index.
Return Value
Nil
Discussion
This function will perform an animation to switch from book list to Pepper list.
Availability
Available in version 1.0 and later.
Declared In
PPPepperViewController.h
closeCurrentBook:
Close the current book. Switch from Pepper/3D mode to book mode.
- (void)closeCurrentBook:(BOOL)animated
Parameters
animated
Specify whether to perform a book closing animation.
Return Value
Nil
Discussion
This function can only be called when the view mode is Pepper/3D mode.
Availability
Available in version 1.3.3 and later.
Declared In
PPPepperViewController.h
getBookViewAtIndex:
Get the internal wrapper view of a given bookIndex.
- (PPPageViewContentWrapper*)getBookViewAtIndex:(int)bookIndex
Parameters
bookIndex
The index of the book to be returned.
Return Value
An object of PPPageViewContentWrapper class representing the book with given index.
Return nil if the book is not being allocated in memory.
Discussion
PepperUI is using reuse concept similar to a UITableView. Therefore, only a limited number of views is allocated in memory.
When a book is not being allocated in memory, nil value is returned.
The class PPPageViewContentWrapper is private implementation of PepperUI and might change in future releases.
Availability
Available in version 1.3.0 and later.
Declared In
PPPepperViewController.h
openPageIndex:
Open a given page into fullscreen.
- (void)openPageIndex:(int)pageIndex
Parameters
pageIndex
The index of the page to be switched to.
When a right/odd pageIndex is given, it will be converted to the respective even index.
Return Value
Nil
Discussion
This function does nothing when the view mode is book list or page list.
It will perform an animation to open the given pageIndex into page list.
Availability
Available in version 1.0 and later.
Declared In
PPPepperViewController.h
closeCurrentPage:
Switch from fullscreen/detail mode to Pepper/3D mode.
- (void)closeCurrentPage:(BOOL)animated
Parameters
animated
Specify whether to perform a page closing animation.
Return Value
Nil
Discussion
This function can only be called when the view mode is fullscreen/detail mode.
Availability
Available in version 1.3.3 and later.
Declared In
PPPepperViewController.h
hasPageInPepperView:
Check whether a view is being allocated for the given pageIndex in Pepper/3D mode.
- (BOOL)hasPageInPepperView:(int)pageIndex
Parameters
pageIndex
The index of the page to be checked.
Return Value
Return YES if there is a view being allocated for the given pageIndex.
Discussion
This function should not be called when the current view mode is not Pepper/3D view.
PepperUI is using reuse concept similar to a UITableView. Therefore, only a limited number of views is allocated in memory.
When a page is not being allocated in memory, NO is returned.
Availability
Available in version 1.3.0 and later.
Declared In
PPPepperViewController.h
getPepperPageAtIndex:
Get the internal wrapper view of a given pageIndex in Pepper/3D mode.
- (PPPageViewContentWrapper*)getPepperPageAtIndex:(int)pageIndex
Parameters
pageIndex
The index of the page to be returned.
Return Value
An object of PPPageViewContentWrapper class representing the page with given index.
Return nil if the page is not being allocated in memory.
Discussion
PepperUI is using reuse concept similar to a UITableView. Therefore, only a limited number of views is allocated in memory.
When a page is not being allocated in memory, nil value is returned.
The class PPPageViewContentWrapper is private implementation of PepperUI and might change in future releases.
Availability
Available in version 1.3.0 and later.
Declared In
PPPepperViewController.h
animateControlIndexTo:duration:
Perform flipping or scrolling animation to go to a given pageIndex in Pepper/3D mode or fullscreen/detail mode.
- (void)animateControlIndexTo:(float)pageIndex duration:(float)duration
Parameters
pageIndex
The index of the left page to be flipped to.
duration
Duration of the animation, in seconds.
Return Value
Nil.
Discussion
This function should not be called when the current view mode is book mode.
The public controlIndex property is not animatable. This function should be used to animate the flipping animation instead.
Availability
Available in version 1.3.0 and later.
Declared In
PPPepperViewController.h
getCurrentPageIndex
Get the current index of the book in the centered or being opened.
- (int)getCurrentPageIndex
Parameters
Nil
Return Value
The index of the current page in fullscreen/detail mode
Discussion
This function should not be called when the view is not fullscreen/detail mode.
Use didScrollWithPageIndex delegate method if you need the intermediate position.
Availability
Available in version 1.2.0 and later.
Declared In
PPPepperViewController.h
hasPageInPageScrollView:
Check whether a view is being allocated for the given pageIndex in fullscreen/detail mode.
- (BOOL)hasPageInPageScrollView:(int)pageIndex
Parameters
pageIndex
The index of the page to be checked.
Return Value
Return YES if there is a view being allocated for the given pageIndex.
Discussion
This function should not be called when the current view mode is not fullscreen/detail view.
PepperUI is using reuse concept similar to a UITableView. Therefore, only a limited number of views is allocated in memory.
When a page is not being allocated in memory, NO is returned.
Availability
Available in version 1.3.0 and later.
Declared In
PPPepperViewController.h
scrollToPage:duration:
Scroll the page list to a given page index.
- (void)scrollToPage:(int)pageIndex duration:(float)duration
Parameters
pageIndex
The index of the page to be switched to.
duration
Duration of animation. Set to 0 for no animation.
Return Value
Nil
Discussion
This function does nothing when the view mode is not page list.
Availability
Available in version 1.0 and later.
Declared In
PPPepperViewController.h
getDetailViewAtIndex:
Get the internal wrapper view of a given bookIndex in fullscreen/detail mode.
- (PPPageViewDetailWrapper*)getDetailViewAtIndex:(int)pageIndex
Parameters
pageIndex
The index of the page to be returned.
Return Value
An object of PPPageViewDetailWrapper class representing the page with given index.
Return nil if the page is not being allocated in memory.
Discussion
PepperUI is using reuse concept similar to a UITableView. Therefore, only a limited number of views is allocated in memory.
When a page is not being allocated in memory, nil value is returned.
The class PPPageViewDetailWrapper is private implementation of PepperUI and might change in future releases.
Availability
Available in version 1.3.0 and later.
Declared In
PPPepperViewController.h
All methods in this protocol are required.
ppPepperViewController:numberOfBooks:
Asks the datasource for a view to insert in a particular book/cover of the book list.
- (int)ppPepperViewController:(PPPepperViewController*)scrollList numberOfBooks:(int)dummy
Parameters
scrollList
The PepperUI object requesting the view.
dummy
Please ignore. Reserved for future use.
Return Value
The number of books.
Availability
Available in version 1.0 and later.
Declared In
PPPepperViewController.h
ppPepperViewController:numberOfPagesForBookIndex:
Asks the data source to return the number of books in the book list.
- (int)ppPepperViewController:(PPPepperViewController*)scrollList numberOfPagesForBookIndex:(int)bookIndex
Parameters
scrollList
The PepperUI object requesting the view.
bookIndex
The index number identifying a book.
Return Value
The number of pages in given bookIndex.
Availability
Available in version 1.0 and later.
Declared In
PPPepperViewController.h
ppPepperViewController:viewForBookIndex:withFrame:reusableView:
Asks the data source to return the number of pages in a given book in the Pepper list and page list.
- (UIView*)ppPepperViewController:(PPPepperViewController*)scrollList viewForBookIndex:(int)bookIndex withFrame:(CGRect)frame reusableView:(UIView*)contentView
Parameters
scrollList
The PepperUI object requesting the view.
bookIndex
The book index locating a book in book scrollview.
frame
The frame of the wrapper view to be for initWithFrame of content view.
contentView
The content view being reused. nil for first time.
Return Value
An object inheriting from UIView class.
Return nil to make the content view of this book/page blank. PepperUI will still show the wrapper view containing a background image.
Availability
Available in version 1.0 and later.
Declared In
PPPepperViewController.h
ppPepperViewController:thumbnailViewForPageIndex:inBookIndex:withFrame:reusableView:
Asks the datasource for a view to insert in a particular Pepper/3D page of the Pepper list.
- (UIView*)ppPepperViewController:(PPPepperViewController*)scrollList thumbnailViewForPageIndex:(int)pageIndex inBookIndex:(int)bookIndex withFrame:(CGRect)frame reusableView:(UIView*)contentView
Parameters
scrollList
The PepperUI object requesting the view.
bookIndex
The book index locating a book in book scrollview.
pageIndex
The page index locating a page in Pepper/3D view for the given bookIndex.
frame
The frame of the wrapper view to be for initWithFrame of content view.
contentView
The content view being reused. nil for first time.
Return Value
An object inheriting from UIView class.
Return nil to make the content view of this book/page blank. PepperUI will still show the wrapper view containing a background image.
Availability
Available in version 1.0 and later.
Declared In
PPPepperViewController.h
ppPepperViewController:detailViewForPageIndex:inBookIndex:withFrame:reusableView:
Asks the datasource for a view to insert in a particular fullscreen/detail page of the page list.
- (UIView*)ppPepperViewController:(PPPepperViewController*)scrollList detailViewForPageIndex:(int)pageIndex inBookIndex:(int)bookIndex withFrame:(CGRect)frame reusableView:(UIView*)contentView
Parameters
scrollList
The PepperUI object requesting the view.
bookIndex
The book index locating a book in book scrollview.
pageIndex
The page index locating a page in fullscreen/detail view for the given bookIndex.
frame
The frame of the wrapper view to be for initWithFrame of content view.
contentView
The content view being reused. nil for first time.
Return Value
An object inheriting from UIView class.
Return nil to make the content view of this book/page blank. PepperUI will still show the wrapper view containing a background image.
Availability
Available in version 1.0 and later.
Declared In
PPPepperViewController.h