Since iOS 7, developers can attach a NSTextAttachemnt
to a UITextView
, and it will display as an image. What if I want to attach a UIView
to a text editor, and it can layout with all other text?
Here comes a solution. This project is based on NSTextAttachment
, and no private API is used, no Black Magic.
To run the example project, clone the repo, and run pod install
from the Example directory first.
- iOS 7 and up
- Xcode 7 and up
RTViewAttachment is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "RTViewAttachment"
Ricky Tan, [email protected]
RTViewAttachment is available under the MIT license. See the LICENSE file for more info.