![image](https://raw.githubusercontent.com/zhuchaowe/EasyIOS/gh-pages/images/logo.png) EasyIOS Swift版本新鲜出炉! ======= [![Version](https://img.shields.io/cocoapods/v/EasyIOS-Swift.svg?style=flat)](http://cocoapods.org/pods/EasyIOS-Swift) [![License](https://img.shields.io/cocoapods/l/EasyIOS-Swift.svg?style=flat)](http://cocoapods.org/pods/EasyIOS-Swift) [![Platform](https://img.shields.io/cocoapods/p/EasyIOS-Swift.svg?style=flat)](http://cocoapods.org/pods/EasyIOS-Swift) [![qq](http://img.shields.io/badge/QQ%E7%BE%A4-340906744-green.svg)](http://shang.qq.com/wpa/qunwpa?idkey=562d002e275a8199081313b00580fb7111a4faf694216a239064d29f5238bc91) ## Star不可少啊! * [IOSX - EasyIOS官方论坛](http://dev.iosx.me) * [EasyIOS-ObjC版本](https://github.com/EasyIOS/EasyIOS) * 使用教程正在快马加鞭编写中! ## DEMO Video [![ScreenShot](http://g3.tdimg.com/0d239f40817111df0dfe941cbc6f9d5e/b0_2.jpg)](http://www.tudou.com/v/aWwPwUhdt5E/&rpid=6059352&resourceId=6059352_04_05_99/v.swf) ## 新版特性 * MVVM : `Model-View-ViewModel` 实现代码分离,分离ViewController中的大量逻辑代码,解决ViewController承担了过多角色而造成的代码质量低下。增加视图与模型的绑定特性。 * HTML To Native : 利用类似HTML的语言来对UI进行布局,简单易学,可重用 * DataBinding : 采用了第三方库`SwiftBond`,可以实现数据绑定操作,同样HTML里也可以进行数据绑定操作,识别标签是双大括号比如`{{title}}` * Reflect Cocoa Touch : 可以反射所有Cocoa Touch中UIKit的所有属性,目前实现了一部分,后面大家一起来维护,增加更多API * AutoLayout : 在HTML进行`Autolayout`布局,真的很简单! * Live Load : 在模拟器中运行app,在修改HTML之后进行保存,模拟器中会自动更新UI布局,不需要重新编译APP * Cryptographic HTML : 为了保证HTML代码的安全,我们提供了`AES Encryption`对HTML进行加密 * URLManager : 我们可以利用URL来push或者present一个视图 * Elegant PullToRefresh : 可以利用HTML轻松的添加下拉刷新和上拉加载控件 ## HTML To Native * UITableView With PullReflash * `align`,`margin` 来控制UIView的布局 * `pull-to-refresh="handlePullRefresh." `,`infinite-scrolling="handleInfinite. PullFooter"` 来添加下拉刷新和上拉加载 * `handlePullRefresh.` handle the event by `func handlePullRefresh (tableView:UITableView)` ,you can define it by yourself. * `PullFooter` can load the custom PullReflashView ```HTML
{{title}} {{subTitle}}
{{title}}
``` * UIScrollView With CSS * Use the CSS by `@` for example `@contentAlign`. ```HTML
``` * HTML Label and reusable html * `@import(LabelHtml)` to import the `LabelHtml.xml` * When span set `style="color:#ACACAC;font-size:18px;"` node ,we can use the origin html inner the span tag. ```HTML
@import(LabelHtml)
``` * UICollectionView with FlowLayout ```HTML
{{name}}
``` ## MVVM The MVVM based on the Swift binding framework [SwiftBond](https://github.com/SwiftBond/Bond) Bond is a Swift binding framework that takes binding concept to a whole new level - boils it down to just one operator. It's simple, powerful, type-safe and multi-paradigm - just like Swift. ## Usage To run the example project, clone the repo, and run `pod install` from the Demo directory first. ## Requirements * Swift * IOS8 ## Installation EasyIOS-Swift is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile: ```ruby platform :ios, '8.0' use_frameworks! pod "EasyIOS-Swift" ``` import the EasyIOS ```swift import EasyIOS ``` ## Author zhuchao, zhuchao@iosx.me ## License EasyIOS-Swift is available under the MIT license. See the LICENSE file for more info.