Giter Club home page Giter Club logo

iasearchkit's Introduction

IASearchKit

介绍

  • 支持精确搜索、拼音首字母搜索、全拼搜索
  • 支持关键字识别,多个关键字识别

效果图

image

cocoapods 安装

gem install cocoapods

Podfile

pod 'IASearchKit', '~> 1.0.4'

或者直接: pod 'IASearchKit'

Then pod install

SearchKit文件描述

  • IAUni2Pinyin.txt 这个文件记录着所有中文的uncoide及其对应的多音字(⚠️ 不要去修改这个文件下的东西
  • IAPinYinHelper 这个 Helper 类提供了一些转换字符串到拼音的便利方法
  • IAPinYinManager 单例类,这里有个apiloadPinyinData需要在合适的时候去调用,它会把IAUni2Pinyin文件中的内容读取到内存中去
  • NSString+Search 这个分类用于搜索关键字或者拼音匹配识别,一般用这个类里的方法就够了
  • NSArray+Combine 工具类,不多介绍...

使用

下面方法就是拼音匹配的用法:

NSRange range;
BOOL match = [self.textLabel.text canMatchWithKeyword:searchText range:&range];
if (match) {

}

许可证

This project is licensed under the terms of the MIT license. See the LICENSE file.

This project and all fastlane tools are in no way affiliated with Apple Inc. This project is open source under the MIT license, which means you have full access to the source code and can modify it to fit your own needs. All fastlane tools run on your own computer or server, so your credentials or other sensitive information will never leave your own computer. You are responsible for how you use fastlane tools.

iasearchkit's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.