All Projects → dequan1331 → Hybridpagekit

dequan1331 / Hybridpagekit

Licence: mit
A high-performance、high-extensibility、easy integration framework for Hybrid content page. Support most content page types of News App.

Projects that are alternatives of or similar to Hybridpagekit

Wkwebviewjavascriptbridge
🌉 A Bridge for Sending Messages between Swift and JavaScript in WKWebViews.
Stars: ✭ 863 (-21.62%)
Mutual labels:  hybrid, wkwebview
Tysnapshotscroll
一句代码保存截图,将 UIScrollView UITableView UICollectionView UIWebView WKWebView 网页 保存 为 长图 查看。Save the scroll view page as an image,support UIScrollView,UITableView,UICollectionView,UIWebView,WKWebView.(Support iOS13)
Stars: ✭ 709 (-35.6%)
Mutual labels:  scrollview, wkwebview
React Native Sortable List
React Native Sortable List component
Stars: ✭ 678 (-38.42%)
Mutual labels:  scrollview
Saber
Window-Based Hybrid CPU/GPU Stream Processing Engine
Stars: ✭ 35 (-96.82%)
Mutual labels:  hybrid
Rsdayflow
iOS 7+ Calendar (Date Picker) with Infinite Scrolling.
Stars: ✭ 843 (-23.43%)
Mutual labels:  scrollview
Txscrolllabelview
🌭TXScrollLabelView, the best way to show & display information such as adverts / boardcast / onsale e.g. with a customView.
Stars: ✭ 714 (-35.15%)
Mutual labels:  scrollview
Andorid Litehybrid Webview
A android hybrid framework, works for H5 and native interactions via webview.
Stars: ✭ 39 (-96.46%)
Mutual labels:  hybrid
Jxbwkwebview
An component WebView for iOS base on WKWebView
Stars: ✭ 646 (-41.33%)
Mutual labels:  wkwebview
Ynpageviewcontroller
特斯拉组件、QQ联系人布局、多页面嵌套滚动、悬停效果、美团、淘宝、京东、微博、腾讯新闻、网易新闻、今日头条等标题滚动视图
Stars: ✭ 1,067 (-3.09%)
Mutual labels:  scrollview
Ltscrollview
ScrollView嵌套ScrolloView(UITableView 、UICollectionView)解决方案, 支持OC / Swift(持续更新中...)实现原理:http://blog.csdn.net/glt_code/article/details/78576628
Stars: ✭ 897 (-18.53%)
Mutual labels:  scrollview
Uiscrollview Infinitescroll
UIScrollView ∞ scroll category
Stars: ✭ 957 (-13.08%)
Mutual labels:  scrollview
Mobileblazorbindings
Experimental Mobile Blazor Bindings - Build native and hybrid mobile apps with Blazor
Stars: ✭ 893 (-18.89%)
Mutual labels:  hybrid
Parallaxheader
Simple way to add parallax header to UIScrollView/UITableView written in Swift.
Stars: ✭ 808 (-26.61%)
Mutual labels:  scrollview
Hybrid
A framework for building apps with hybrid.
Stars: ✭ 15 (-98.64%)
Mutual labels:  hybrid
Ios tips
iOS的一些示例,持续更新中:1、AVFoundation 高仿微信相机拍摄和编辑 2、AVFoundation 人脸检测、实时滤镜、音视频编解码、GPUImage框架的使用等音视频相关内容 3、OpenGLES 4、LeetCode算法练习 5、iOS Crash防护和APM监控 6、WKWebView相关的内容 等........
Stars: ✭ 896 (-18.62%)
Mutual labels:  wkwebview
Leo Javascript
欢迎关注公众号“前端自习课”,本仓库包含丰富的 JavaScript 学习资料,包括 JavaScript、前端框架、HTTP、GraphQL、TS、Webpack等,还有很多我的原创文章,喜欢的朋友欢迎stat。🚀持续更新中...
Stars: ✭ 647 (-41.24%)
Mutual labels:  hybrid
Smkcyclescrollview
SMKCycleScrollView - An awesome advertisement cycleScrollView
Stars: ✭ 11 (-99%)
Mutual labels:  scrollview
Nat Explorer
An example project using Nat & Weex.
Stars: ✭ 55 (-95%)
Mutual labels:  hybrid
Agentweb
AgentWeb is a powerful library based on Android WebView.
Stars: ✭ 8,375 (+660.67%)
Mutual labels:  hybrid
G3d
A pure 3D render engine compatible with webgl, running both in browser and gcanvas.
Stars: ✭ 948 (-13.9%)
Mutual labels:  hybrid

HybridPageKit

GitHub Cocoapods platforms GitHub closed issues GitHub code size in bytes

Extended Reading | 中文 | 扩展阅读

HybridPageKit is a easy integration framework for Content pages of News App

Base on the details metioned in Extended Reading.


Install

  1. CocoaPods
//In your Podfile
pod "HybridPageKit", :testspecs => ["HybridPageKitTests"]
...
  1. Carthage
//In your Cartfile
git "https://github.com/dequan1331/HybridPageKit.git" "master"
  1. Cloning the repository

Features

Strongly Recommended to read iOS News App Content Page Technology Overview

  • Protocol oriented,dozens of lines of code can be completed hybrid content page of News App.
  • High-extensibility, component-based and POP content page architecture.
  • Use and Extend WKWebView, stable、few bugs、 support more features.
  • Reuse of WKWebView, reuse of component Views.
  • Convert all non-Text components of WebView into Native.
  • High-performance and thread safety.

Related Links

Usage

  1. Base on data-template separation data.
{
//Content HTML
"articleContent": "<!DOCTYPE html><html><head></head><body><P>TEXTTEXTTEXTTEXTTEXTTEXT</P><P>{{IMG_0}}</P><P>TEXTTEXTTEXTTEXTTEXTTEXT</P><P>{{IMG_1}}</P><P>TEXTTEXTTEXTTEXTTEXTTEXT</P><P>{{IMG_2}}</P><P>The End</P></body></html>",

//non-Text component data of webView
"articleAttributes": {
	"IMG_0": {
	    "url": "http://127.0.0.1:8080?type=3",
	    "width": "340",
	    "height": "200"
	},
	"IMG_1": {
	    "url": "http://127.0.0.1:8080?type=3",
	    "width": "340",
	    "height": "200"
	},
	"IMG_2": {
	    "url": "http://127.0.0.1:8080?type=3",
	    "width": "340",
	    "height": "200"
	},
},  

//component data of Native Extension area
"articleRelateNews": {
    "index":"1",
    "newsArray" : [
        "Extension Reading area - RelateNews - 1",
        "Extension Reading area - RelateNews - 2",
        "Extension Reading area - RelateNews - 3",
        "Extension Reading area - RelateNews - 4",
    ],
}, 

//component data of Native Extension area
"articleComment": {
    "index":"2",
    "commentArray" : [
        "Comment area - Comment - 1",
        "Comment area - Comment - 2",
        "Comment area - Comment - 3",
        "Comment area - Comment - 4",
    ],
},  
}
  1. create Model & View
//Model 
@interface VideoModel : NSObject<HPKModelProtocol>
...
IMP_HPKModelProtocol(@"");

//View 
@interface VideoView : UIImageView<HPKViewProtocol>
...
IMP_HPKViewProtocol()

  1. create component Controller
@interface VideoController : NSObject<HPKControllerProtocol>
...
- (nullable NSArray<Class> *)supportComponentModelClass {
	return @[[VideoModel class]];
}
...
- (nullable Class)reusableComponentViewClassWithModel:(HPKModel *)componentModel {
	return [VideoView class];
}
...
- (void)scrollViewWillDisplayComponentView:(HPKView *)componentView
                    componentModel:(HPKModel *)componentModel {
...
}

- (void)controllerViewDidDisappear {
...
}
  1. implement simple content page
...
_componentHandler = [[HPKPageHandler alloc] initWithViewController:self componentsControllers:@[VideoController ...];
...
[_componentHandler handleSingleScrollView:[[UIScrollView alloc] initWithFrame:self.view.bounds]];
...
[_componentHandler layoutWithComponentModels:@[VideoModel ...]];
...
  1. implement hybrid content page
// in page viewController
...
_componentHandler = [[HPKPageHandler alloc] initWithViewController:self componentsControllers:@[VideoController ...];
...
[_componentHandler handleHybridPageWithContainerScrollView:[[UIScrollView alloc] initWithFrame:self.view.bounds] defaultWebViewClass:[HPKWebViewSubClass class] defaultWebViewIndex:1 webComponentDomClass:@"domClass" webComponentIndexKey:@"domAttrIndex"];
...
[_componentHandler layoutWithWebComponentModels:@[WebVideoModel ...]];
...
[_componentHandler layoutWithComponentModels:@[VideoModel ...];
...

Licenses

All source code is licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].