NSFormatter 子类集合 FormatterKit
- 授权协议: MIT
- 开发语言: Objective-C
- 操作系统: iOS
- 软件首页: https://github.com/mattt/FormatterKit
软件介绍
FormatterKit 收集了一系列精心设计的 NSFormatter
子类,例如信息单元,距离和相对时间间隔。每一个 formatter 从他们各自领域的复杂商业逻辑中抽离出来,所以你可以专注用于你的应用程序。
示例代码:
TTTTimeIntervalFormatter *timeIntervalFormatter = [[TTTTimeIntervalFormatter alloc] init]; [timeIntervalFormatter stringForTimeInterval:0]; // "just now" [timeIntervalFormatter stringForTimeInterval:-100]; // "1 minute ago" [timeIntervalFormatter stringForTimeInterval:-8000]; // "2 hours ago" // Turn idiomatic deictic expressions on / off [timeIntervalFormatter stringForTimeInterval:-100000]; // "1 day ago" [timeIntervalFormatter setUsesIdiomaticDeicticExpressions:YES]; [timeIntervalFormatter stringForTimeInterval:-100000]; // "yesterday" // Customize the present tense deictic expression for [timeIntervalFormatter setPresentDeicticExpression:@"seconds ago"]; [timeIntervalFormatter stringForTimeInterval:0]; // "seconds ago" // Expand the time interval for present tense [timeIntervalFormatter stringForTimeInterval:-3]; // "3 seconds ago" [timeIntervalFormatter setPresentTimeIntervalMargin:10]; [timeIntervalFormatter stringForTimeInterval:-3]; // "seconds ago"
Rapid Web Applications with TurboGears
Mark Ramm、Kevin Dangoor、Gigi Sayfan / Prentice Hall PTR / 2006-11-07 / USD 44.99
"Dear PHP, It's over between us. You can keep the kitchen sink, but I want my MVC. With TurboGears, I was able to shed the most heinous FileMaker Pro legacy 'solu-tion' imaginable. It has relationshi......一起来看看 《Rapid Web Applications with TurboGears》 这本书的介绍吧!
