测试已测试 | ✗ |
语言语言 | Obj-CObjective C |
许可证 | MIT |
发布日期上次发布日期 | 2014年12月 |
由 Bogdan Stasjuk 维护。
HTML 页面查看器是基于 UIPageViewController 和 UIWebView、工具栏和 UIPageControl 的 iPhone 和 iPad。
工具栏 和 UIPageControl 可进行自定义
@property(nonatomic, strong, readonly) UIToolbar *toolbar;
@property(nonatomic, strong, readonly) UIPageControl *pageControl;
初始化方法只有一个
- (id)initWithDataSource:(id)dataSource andStartPageNum:(Byte)startPage;
数据源协议 如下
@protocol BSHtmlPageViewControllerDataSource <NSObject>
@required
- (Byte)numberOfHtmlPages;
@optional
- (NSString *)htmlLinkForPage:(Byte)pageNumber;
- (NSString *)htmlContentForPage:(Byte)pageNumber;
@end
以下一个可选方法必须被实现。
克隆项目并运行它。您可以在 TestViewController.m
中找到使用示例。
此类已经在 iOS 6.0 上进行了测试。
Cocoapods: pod 'BSHtmlPageViewController'
手动: 将 BSHtmlPageViewController 文件夹复制到您的项目中并导入头文件
#import "BSHtmlPageViewController.h"
此代码在 MIT 许可证下发布。有关详细信息,请参阅 LICENSE 文件。