- 授权协议: MIT
- 开发语言: Objective-C
- 操作系统: iOS
- 软件首页: https://github.com/mattt/TTTAttributedLabel
- 软件文档: http://mattt.github.com/TTTAttributedLabel/
软件介绍
TTTAttributedLabel 是 UILable 的改进,支持 NSAttributedStrings
示例代码:
TTTAttributedLabel *label = [[[TTTAttributedLabel alloc] initWithFrame:CGRectZero] autorelease]; label.font = [UIFont systemFontOfSize:14]; label.textColor = [UIColor darkGrayColor]; label.lineBreakMode = UILineBreakModeWordWrap; label.numberOfLines = 0; NSString *text = @"Lorem ipsum dolar sit amet"; [label setText:text afterInheritingLabelAttributesAndConfiguringWithBlock:^ NSAttributedString *(NSMutableAttributedString *mutableAttributedString) { NSRange boldRange = [[mutableAttributedString string] rangeOfString:@"ipsum dolar" options:NSCaseInsensitiveSearch]; NSRange strikeRange = [[mutableAttributedString string] rangeOfString:@"sit amet" options:NSCaseInsensitiveSearch]; // Core Text APIs use C functions without a direct bridge to UIFont. See Apple's "Core Text Programming Guide" to learn how to configure string attributes. UIFont *boldSystemFont = [UIFont boldSystemFontOfSize:14]; CTFontRef font = CTFontCreateWithName((CFStringRef)boldSystemFont.fontName, boldSystemFont.pointSize, NULL); if (font) { [mutableAttributedString addAttribute:(NSString *)kCTFontAttributeName value:(id)font range:boldRange]; [mutableAttributedString addAttribute:@"TTTCustomStrikeOut" value:[NSNumber numberWithBool:YES] range:strikeRange]; CFRelease(font); } return mutableAttributedString; }];
深入浅出Node.js
朴灵 / 人民邮电出版社 / 2013-12-1 / CNY 69.00
本书从不同的视角介绍了 Node 内在的特点和结构。由首章Node 介绍为索引,涉及Node 的各个方面,主要内容包含模块机制的揭示、异步I/O 实现原理的展现、异步编程的探讨、内存控制的介绍、二进制数据Buffer 的细节、Node 中的网络编程基础、Node 中的Web 开发、进程间的消息传递、Node 测试以及通过Node 构建产品需要的注意事项。最后的附录介绍了Node 的安装、调试、编码......一起来看看 《深入浅出Node.js》 这本书的介绍吧!
