iOS 异步开发 PromiseKit
- 授权协议: MIT
- 开发语言: Swift Objective-C Ruby
- 操作系统: OS X
- 软件首页: http://promisekit.org/
- 软件文档: https://github.com/mxcl/promisekit
软件介绍
现代化的开发都要求高度异步,iOS 开发也是一样,PromiseKit 能提供强大的 iOS 开发异步功能,非常容易使用。
PromiseKit 不仅仅是 Promises 的实现,还是辅助函数的集合,使得 iOS 开发典型的异步模式更强大。
PromiseKit 支持集成到其他 Cocoapods,如果用户的库有异步操作,而又喜欢使用 PromiseKit,则可以添加了一个可选的缺省子说明书,提供 Promises 服务,文档会帮助集成 PromiseKit 到用户自身的 pods 中。
示例:
[CLLocationManager promise].catch(^{
return self.chicagoLocation;}).then(^(CLLocation *loc){
return [NSURLConnection GET:@"http://user.net/%f/%f", loc.latitude, loc.longitude];}).then(^(NSDictionary *user){
UIAlertView *alert = [UIAlertView new];
alert.title = [NSString stringWithFormat:@"Hi, %@!", user.name];
[alert addButtonWithTitle:@"Bye"];
[alert addButtonWithTitle:@"Hi!"];
return alert.promise;}).then(^(NSNumber *tappedButtonIndex, UIAlertView *alert){
if (tappedButtonIndex.intValue == alert.cancelButtonIndex)
return nil;
id vc = [HelloViewController new]
return [self promiseViewController:vc animated:YES completion:nil].then(^(id resultFromViewController){
//…
});}).catch(^(NSError *err){
//…});
极致:互联网时代的产品设计
戴维•罗斯 / 中信出版集团 / 2016-6 / 49.00元
在不远的未来,日常物品将能够迅速理解我们的需求,改善我们的生活,并随处可见。为了实现这一预期,我们需要能够发现用户使用产品的场景,找到用户高频刚需痛点的产品设计者。 站在下一个转型发展的悬崖上,我们看到技术将更具人性。随着物联网的发展,我们习以为常的数百件日常物品:汽车、钱包、手表、雨伞甚至垃圾桶,都将回应我们的需求,了解我们,学习为我们思考。最先出现的智能硬件为什么是智能手环、无人驾驶汽车......一起来看看 《极致:互联网时代的产品设计》 这本书的介绍吧!
