Text editor mimicking Apple's Notes with some additional features
- Tap to start editing
- Auto-detect links even while typing
- Open links in-app (local browser)
- Add/remove links from text
UITextView
does not support tap to edit. Moreover it doesn't detect/open links while editing. To fix this we:
- Recognize tap gesture on
UITextView
- Calculate the nearest cursor position
- Use
NSLayoutManager
andNSTextStorage
apis to detect whether the tap location contains a link and open it - Differentiate between auto-detected links and user created links using tags
This code is based on the MVC architecture and UIKit. It is missing some basic features like persistence, etc.