测试已测试 | ✗ |
语言语言 | CC |
许可证 | MIT |
发布最后发布 | 2015年10月 |
由 zhuchao 维护。
依赖关系 | |
HanekeSwift | >= 0 |
Bond | >= 0 |
Alamofire | >= 0 |
SnapKit | >= 0 |
Kingfisher | >= 0 |
ObjectMapper | >= 0 |
ReachabilitySwift | >= 0 |
TTTAttributedLabel | >= 0 |
Model-View-ViewModel
{{title}}
AutoLayout
的 HTML 布局AES 加密
来加密 HTMLalign
、margin
用于控制 UIView 的 AutoLayoutpull-to-refresh="handlePullRefresh."
、infinite-scrolling="handleInfinite. PullFooter"
用于添加 PullRefresh 或 InfiniteScrollinghandlePullRefresh.
通过 func handlePullRefresh (tableView:UITableView)
处理事件,您可以根据自己的需求定义它。PullFooter
可加载自定义的 PullReflashView<body>
<div id="tableview" align="64 0 0 0" content-inset="{0,0,0,0}" type="UITableView" estimated-row-height="100" separator-style="None" pull-to-refresh="handlePullRefresh." infinite-scrolling="handleInfinite. PullFooter">
<div align="0 0 0 0" type="cell" id="cell" >
<img id="avatar" align="10 10 -10 *" clips-to-bounds="YES" width="45" height="45" layer_corner-radius="5" src="{{srcUrl}}" />
<span align="top:2 avatar;right:-10" margin="left:12 avatar" font="15 system" id="title">{{title}}</span>
<span align="bottom:0 avatar;right:-10" margin="left:12 avatar" font="13 system" text-color="#ACACAC" id="subTitle" style="color:#ACACAC;" link-style="color:green;" >{{subTitle}}</span>
</div>
<div type="section" id="bgView" background-color="#F2F1F6" >
<span align="left:15;center-y:0" font="14 system">{{title}}</span>
</div>
</div>
</body>
@
的 CSS,例如 @contentAlign
<style>
.contentAlign{
edge:0 0 0 0;left:0 root;right:0 root;
}
.inputStyle{
font-size:15;color:#999999;
}
</style>
<body>
<div align="0 0 0 0" type="UIScrollView" background-color="#F3F3F3">
<div align="@contentAlign">
<img id="logo" image="login-logo" user-interaction-enabled="YES" present="demo://login" align="center-x:0;top:110;"/>
<div id="username" layer_corner-radius="8" background-color="white" align="* 15 * -15" margin="top:30 logo" height="45">
<input class="userTextField" id="userTextField" align="edge:10 10 -10 -10;" placeholder-style="@inputStyle" keyboard-type="EmailAddress" style="@inputStyle" placeholder="上面的logo可以被点击"/>
</div>
<div id="password" layer_corner-radius="8" background-color="white" align="* 15 * -15" margin="top:13 username" height="45">
<input id="passwordTextField" secure-text-entry="YES" align="10 10 -10 -10" placeholder="密码" placeholder-style="@inputStyle" style="@inputStyle" />
</div>
<button id="submit" style="color:white;font-size:20;" background-color="#3FBCFB" align="* 15 -10 -15" margin="top:25 password" height="45" layer_corner-radius="8" onEvent="touch-up-inside:login">登陆</button>
</div>
</div>
</body>
@import(LabelHtml)
导入 LabelHtml.xml
style="color:#ACACAC;font-size:18px;"
属性时,我们可以在 span 标签内使用原始 HTML<style>
<!--支持css 样式设置,html中利用@的方式进行调用-->
.contentAlign{
edge:0 0 0 0;left:0 root;right:0 root;
}
</style>
<body>
<div align="0 0 0 0" type="UIScrollView" background-color="#F3F3F3">
<div align="@contentAlign">
<!--span标签设置了style属性则启用富文本模式,span内部可以支持原生HTML的所有属性,具体请看LabelHtml.xml文件-->
<span align="64 0 0 0" style="color:#ACACAC;font-size:18px;" link-style="color:green;" number-of-lines="0">
<!--import the xml -->
@import(LabelHtml)
</span>
</div>
</div>
</body>
<body>
<div id="collectionView" align="0 0 0 0" type="UICollectionView" flow-layout="scroll-direction:Vertical;item-size:{300,50};section-inset:{3,3,0,3};minimum-interitem-spacing:3;minimum-line-spacing:3" content-inset="{64,0,0,0}" background-color="white" pull-to-refresh="handlePullRefresh." infinite-scrolling="handleInfinite.">
<div align="0 0 0 0" type="cell" id="cell" background-color="red">
<span align="10 10 -10 -10" font="10 system">{{name}}</span>
</div>
</div>
</body>
基于 Swift 绑定框架 SwiftBond 的 MVVM
Bond 是一个 Swift 绑定框架,将绑定概念提升到了一个新的水平 - 简化到仅仅一个操作符。它简单、强大、类型安全且多范式 - 就像 Swift 一样。
要运行示例项目,首先克隆仓库,然后从 Demo 目录运行 pod install
。
EasyIOS-Swift 通过 CocoaPods 提供。要安装,只需将以下行添加到您的 Podfile 中
platform :ios, '8.0'
use_frameworks!
pod "EasyIOS-Swift"
导入 EasyIOS
import EasyIOS
EasyIOS-Swift 可在 MIT 许可下使用。有关更多信息,请参阅 LICENSE 文件。