如何用html构建ios应用,TokenHybrid 是一个可以让你脱离服务器,使用HTML,CSS,JS构建iOS 原生界面的库...

TokenHybrid

625332134c6f4d4600884b99daebf603.png625332134c6f4d4600884b99daebf603.png625332134c6f4d4600884b99daebf603.png625332134c6f4d4600884b99daebf603.png625332134c6f4d4600884b99daebf603.png

What is TokenHybrid?

This is a tool that will get you out of a server ,using HTML,CSS,JS to build native interface. The following troubles will disappear.

You can skip the long process that you need to update the content of app or submit it to the app store.

No longer rely on the server. You can control the contents of the app dynamically. Bonus scenes are easy to creat.

Replace some H5 apps with this tool and provide a better experience.

Thesr is no doubt that TokenHybrid will increase the flexibility of development!

How to get out of a server

How TokenHybrid updates the app without a server? It requests the HTML text and analyzes the text into a data structure. And Native UI based on the data structure.

How to place HTML, CSS, JS files? You can do it with github or other code hosting services. Just needs the row URL of the HTML.

First ,write these files and push to github.

Second ,click the file and get the row URL.

Features

light weight,high scalability,independent developers no longer rely on the server to upgrade the app.

Replace a part of H5 apps.It caches the data structures including view coordinate information automatically for opening the application more quickly the next time.

As long as the HTML update, the interface will automatically update!

Preview the screenshots

All of the following interfaces are built using TokenHybrid.And the HTML source codes are here

625332134c6f4d4600884b99daebf603.png625332134c6f4d4600884b99daebf603.png

How to use

ViewController.m

- (IBAction)start:(id)sender {

NSString *url = @"your html url";

TokenHybridRenderController *obj = [[TokenHybridRenderController alloc] initWithHTMLURL:url];

[self.navigationController pushViewController:obj animated:YES];

}

----------or----------

- (IBAction)start:(id)sender {

self.renderView = [[TokenHybridRenderView alloc] initWithFrame:newRect];

self.renderView.backgroundColor = [UIColor darkGrayColor];

[self.view addSubview:self.renderView];

NSString *url = @"your html url";

[self.renderView buildViewWithSourceURL:url containerViewController:self childRenderControlllerClass:nil];

}

Install

pod 'TokenHybrid'

API

please see Document

Contact me

TokenHybrid是什么?

这是一个可以让你脱离服务器,使用HTML,CSS,JS构建iOS 原生界面的工具,帮你解除以下烦恼

不在为了修复一个小BUG 或者为更新一点内容就得去app store 审核,跳过这个漫长的过程。

不再依赖服务器,自己控制app 的内容,动态更新界面或者功能,给用户创造彩蛋,吸引用户。

取代部分H5,提供更好的体验。

如何不依赖服务器?

TokenHybrid如何做到无需服务器更新app? 原理:请求一段HTML 文本,将HTML分析成相应的数据结构(DOM树),根据这个数据结构来创建Native UI,

并且分析CSS,将样式表合并到Native UI,通过JS来操纵Native。

如何放置HTML,CSS,JS文件呢? 利用github或者其他的代码托管服务就可以做到。

1. 写好的这些文件,Push 到github

2. 在github里面点击HTML 文件,查看并在该工具里面使用Row 地址。

TokenHybrid 特性

轻量,可扩展性高,独立开发者的更新程序不用依赖服务器更新app。

取代部分H5应用,自动缓存数据结构,包括视图的坐标信息,第二次打开更加迅速。

支持部分HTML,CSS标准,使用Flex布局,HTML 更新后,重新打开界面会自动生成新界面!

预览

以上英文说明中所有界面,都使用TokenHybrid 构建 图片中所有HTML源码在这里

如何接入

ViewController.m

- (IBAction)start:(id)sender {

NSString *url = @"your html url";

TokenHybridRenderController *obj = [[TokenHybridRenderController alloc] initWithHTMLURL:url];

[self.navigationController pushViewController:obj animated:YES];

}

----------or----------

- (IBAction)start:(id)sender {

self.renderView = [[TokenHybridRenderView alloc] initWithFrame:newRect];

self.renderView.backgroundColor = [UIColor darkGrayColor];

[self.view addSubview:self.renderView];

NSString *url = @"your html url";

[self.renderView buildViewWithSourceURL:url containerViewController:self childRenderControlllerClass:nil];

}

安装

pod 'TokenHybrid'

或者

下载这个Demo 将 工程里面的 TokenExtension和source 文件夹拖入你的项目即可,依赖的库你可以根据你自己的需要选择去掉或者保留。

API使用

请看Document文件夹

联系我

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值