12 2013 档案

 
理解NSTypesetter 和 NSATSTypesetter
摘要:先说通常意义上的typeset(排字、排版),然后再说NSTypesetter 和 NSATSTypesetter,最后是它们的区别。Typesetting is the composition of text by means of types.这里的type是什么意思呢?In typesetting by hand compositing, a sort or type is a piece of type representing a particular letter or symbol, cast from a matrix mould and assembled with othe 阅读全文
posted @ 2013-12-28 09:37 做个不善的人 阅读(587) 评论(0) 推荐(0) 编辑
理解NSTextContainer
摘要:Apple的Doc对这个类的描述是这样的:The NSTextContainer class defines a region where text is laid out. An NSLayoutManager uses NSTextContainer to determine where to break lines, lay out portions of text, and so on. NSTextContainer defines rectangular regions, but you can create subclasses that define regions of ot 阅读全文
posted @ 2013-12-28 03:19 做个不善的人 阅读(7187) 评论(0) 推荐(0) 编辑
理解NSAttributedString
摘要:An NSAttributedString object manages character strings and associated sets of attributes (for example, font and kerning) that apply to individual characters or ranges of characters in the string.这句话就是对这个类的一个最简明扼要的概括。NSAttributedString管理一个字符串,以及与该字符串中的单个字符或某些范围的字符串相关的属性。比如这个字符串“我爱北京天安门”,“我”跟其他字符的颜色不一 阅读全文
posted @ 2013-12-27 09:06 做个不善的人 阅读(23181) 评论(0) 推荐(3) 编辑
Typographical Concepts
摘要:Glyph(字形)A glyph is an element of writing: an individual mark on a written medium that contributes to the meaning of what is written.glyph是一个独立的标记,用来表达一个它之所以被写出的意思。也就是写了表示一个意思,不写表示另外一个意思。For example, in most languages written in any variety of the Latin alphabet the dot on a lower-case "i" 阅读全文
posted @ 2013-12-26 12:03 做个不善的人 阅读(491) 评论(0) 推荐(0) 编辑
Cocoa Drawing
摘要:Graphics ContextsGraphics contexts are a fundamental part of the drawing infrastructure in Cocoa applications. As the name suggests, a graphics context provides the context for subsequent drawing operations. It identifies the current drawing destination (screen, printer, file, and so on), the coordi 阅读全文
posted @ 2013-12-26 08:39 做个不善的人 阅读(953) 评论(0) 推荐(0) 编辑
AutoReleasePool 和 ARC 以及Garbage Collection
摘要:AutoReleasePoolautoreleasepool并不是总是被auto 创建,然后自动维护应用创建的对象。自动创建的情况如下:1. 使用NSThread的detachNewThreadSelector:toTarget:withObject:方法创建新线程时,新线程自动带有autoreleasepool。2. Main thread of Cocoa Application以下情况需要开发者创建:1. 在使用Dispatch Queue时, 虽然其Pool中每个thread都会有autoreleasepool,但是如果我们给的task每个都创建一些对象,并做autorelease,那 阅读全文
posted @ 2013-12-25 06:58 做个不善的人 阅读(5484) 评论(0) 推荐(0) 编辑

 

点击右上角即可分享
微信分享提示