YYKit 有跡可循
YYLabel -> _state == 23條(“bitfield”數(shù)據(jù)結構)
YYTextMagnifier == 9條(以”類族模式”隱藏實現(xiàn)細節(jié))
self.titles = @[].mutableCopy; == 4條(多用字面量語法,少用與之等價的方法)
iOS 保持界面流暢的技巧 == CA高級技巧中很多灶芝,CPU & GPU
description
+debugDescription
== 17條(實現(xiàn)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條(以"自動釋放池塊"降低內(nèi)存峰值)
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