iphone - EGOTextView 示例

标签 iphone ios ipad editing richtext

我一直在为一个 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/

相关文章:

iphone - UITableViewController 数据源的自定义类

iphone - Storekit 框架可以在 iOS 6 模拟器上运行吗?

ios - 共享的 iAd 横幅横幅 ViewDidLoAd 未被调用

iOS 为什么 requestEndDate 早于 requestStartDate?

ios - 2.10 - iPhone 应用程序还必须以 iPhone 分辨率和 2X iPhone 3GS 分辨率在未经修改的情况下在 iPad 上运行

ios - 新设备的导航栏高度是多少?

iPhone 应用程序在某些设备(不是全部)上启动时崩溃

iphone - UITableView tableFooterView 奇怪的调整大小

ios - 如何将 UIActivityIndi​​catorView 置于 UICollectionViewCell 的中心?

ios - iPhone和iPad的iOS图像大小