Latest 0.0.3
Homepage https://github.com/FasaMo/CharacterLocationSeeker
License MIT
Platforms ios 7.0, requires ARC
Authors

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];

Latest podspec

{
    "name": "CharacterLocationSeeker",
    "version": "0.0.3",
    "summary": "Figure out the rect of a certain character in UILabel.",
    "description": "Figure out the rect of a character in UILabel, with the given character index.",
    "homepage": "https://github.com/FasaMo/CharacterLocationSeeker",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "FasaMo": "Fasa_Mo@iCloud.com"
    },
    "social_media_url": "http://weibo.com/FasaMo",
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/FasaMo/CharacterLocationSeeker.git",
        "tag": "0.0.3"
    },
    "source_files": "CharacterLocationSeeker/CharacterLocationSeeker.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This