我一直在为一个 iOS 项目使用 EGOTextView
,并且能够完成一些非常基本的编辑。它可以插入 UITextView
的位置真的很酷。但是现在我恐怕我没有正确理解如何完全使用。有人知道使用 EGOTextView
进行富文本编辑的示例吗?
最佳答案
你可以调用EGOTextView的这些方法
- (void)setFont:(UIFont *)字体
- (void)setText:(NSString *)text
- (void)setAttributedString:(NSAttributedString*)string
- (void)setEditable:(BOOL)editable
- (void)drawContentInRect:(CGRect)rect
- (NSInteger)closestWhiteSpaceIndexToPoint:(CGPoint)点
- (NSInteger)closestIndexToPoint:(CGPoint)点
- (NSRange)characterRangeAtPoint_:(CGPoint)point
- (NSRange)characterRangeAtIndex:(NSInteger)index
- (void)setCorrectionRange:(NSRange)范围
- (void)setLinkRange:(NSRange)范围
- (UIColor*)选择颜色
- (UITextPosition*)positionFromPosition:(UITextPosition *)position offset:(NSInteger)offset
- (无效)向后删除
- (void)checkLinksForRange:(NSRange)范围
- (void)checkSpellingForRange:(NSRange)range
- (void)longPress:(UILongPressGestureRecognizer*)手势
- (void)doubleTap:(UITapGestureRecognizer*)手势
- (void)spellingCorrection:(UIMenuController*)sender
根据您的需要,还有更多的方法调用。
关于iphone - EGOTextView 示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9758892/