Skip to content

JiaqiSun/CharacterLocationSeeker

 
 

Repository files navigation

CharacterLocationSeeker

Figure out the rect of a character in UILabel, with the given character index. There is another way to do the same thing with a UITextView, you can check the demo.

相关blog

Installation

pod 'CharacterLocationSeeker', '~> 0.0.3'

or pod search CharacterLocationSeeker to check

Usage

  1. Create an instance of CharacterLocationSeeker

self.locationSeeker = [CharacterLocationSeeker new]; 2. Config it with the label

[self.locationSeeker configWithLabel:self.label]; 3. Get the rect with a certain character index

CGRect charRect = [self.locationSeeker characterRectAtIndex:someIndex];

About

获取textView每个字符的frame

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 85.1%
  • Ruby 14.9%