YYKit 有迹可循
YYLabel -> _state == 23条(“bitfield”数据结构)
YYTextMagnifier == 9条(以”类族模式”隐藏实现细节)
self.titles = @[].mutableCopy; == 4条(多用字面量语法,少用与之等价的方法)
iOS 保持界面流畅的技巧 == CA高级技巧中很多,CPU & GPU
description
+debugDescription
== 17条(实现description方法)YYTextSelectionRect
== 重写的属性 — 当你在子类中重写了父类中的属性,你必须使用 @synthesize 来手动合成ivar。YYTextInput — (YYTextPosition + YYTextRange) == Text Programming Guide for iOS - Lower Level Text-Handling Technologies - A Guided Tour of a UITextInput Implementation
YYWeakProxy + (NSTimer+YYAdd) == 52条(NSTimer 会保留其目标对象)
all about @autoreleasepool {...} == 34条(以"自动释放池块"降低内存峰值)
YYThreadSafeDictionary == PSPDFThreadSafeMutableDictionary in The Foundation Collection Classes
YYMemoryCache LRU linked list == switching to custom caching code based on a LRU linked list in The Foundation Collection Classes
YYDispatchQueuePool(Qos) == Prioritize Work with Quality of Service Classes
YYTimer == Minimize Timer Use - Get Event Notifications Without Using Timers
YYLabel
YYLabel
.h - like UILabel + Async
.m - ReleaseQueue + _innerLayout + _highlightLayout(LongPressTimer(callback))
-YYAsyncLayer + Touches Methods(about highlight
)
-YYAsyncLayerDelegate
YYTextLayout
.h - container + layout + Draw
.m - container - encap property All methods is thread-safe.
-layout - layoutWithContainer - ((cgPath + frameAttrs)->ctFrame)->CoreText objects->YYTextLine + needTruncation(truncationToken) + textBoundingSize + iterator text for draw property
-Draw
YYTextLine - encap CTLine for OC property
YYTextInput - encap model
-YYTextPosition : UITextPosition
-YYTextRange : UITextRange
-YYTextSelectionRect : UITextSelectionRect
YYTextAttribute - encap model
-YYTextBackedString
-YYTextBinding
-YYTextShadow
-YYTextDecoration
-YYTextBorder
-YYTextAttachment
-YYTextHighlight