Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 1.12 KB

221.md

File metadata and controls

17 lines (14 loc) · 1.12 KB
contributors
zntfdr
  • TextKit is a special framework that sits between UIKit/AppKit and CoreText
  • In case you’re in doubt on which UIKit element you need:
  • ..and for AppKit:
  • If we have a lot of text do format, UITextView has a allowsNonContiguousLayout property that will format the text only when it is visualized, therefore not requiring the whole text to be formatted before displaying to the user (requires the UITextView’s scrolling to be enabled, otherwise asking for the intrinsic size of the UITextView will need to format the whole text before returning)
  • For security, all text input is potentially untrusted. Therefore before processing any input (what happens if a user pastes a 3M+ words book in our text input?) we should take a look at UITextFieldDelegate (UIKit) and NSFormatter (AppKit).