Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
Version 2.0, 2013-05-16
Updated to use ARC and storyboards. Supporting classes (such as indexed position) factored into separate files.
(Full Revision History)
Xcode 4.6 or later, iOS 6 SDK or later.
iOS 6 or later.
SimpleTextInput is a simple text-editing application for iOS that enables the layout and editing of text using Core Text. It also communicates with the text input system by implementing the the UITextInput and UIKeyInput protocols and related APIs. By communicating with the text input system, it acquires such features as autocorrection and multistage text input.
SimpleTextInput demonstrates: * Creation of objects representing positions and ranges in the text * Insertion and deletion of text * Management of selected and marked text ranges * Computation of rectangles for selections and the "cursor" and other important requirements for implementing the text-input protocols.