TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Bogdan Stasjuk.
HTML page viewer for iPhone and iPad is based on UIPageViewController with UIWebView, Toolbar and UIPageControl.
Toolbar and UIPageControl are open for customization:
@property(nonatomic, strong, readonly) UIToolbar *toolbar;
@property(nonatomic, strong, readonly) UIPageControl *pageControl;
Method for initialization is only one:
- (id)initWithDataSource:(id)dataSource andStartPageNum:(Byte)startPage;
Data source protocol is below:
@protocol BSHtmlPageViewControllerDataSource <NSObject>
@required
- (Byte)numberOfHtmlPages;
@optional
- (NSString *)htmlLinkForPage:(Byte)pageNumber;
- (NSString *)htmlContentForPage:(Byte)pageNumber;
@end
One of the optional methods is required to be implemented.
Clone project and run it. You can find examples of usage at TestViewController.m
.
This class has been tested back to iOS 6.0.
Cocoapods: pod 'BSHtmlPageViewController'
Manual: Copy the BSHtmlPageViewController folder in your project and import header:
#import "BSHtmlPageViewController.h"
This code is released under the MIT License. See the LICENSE file for details.