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

SWPinYinSearcher

根据全拼或简拼,搜索汉字,支持多音字。包含汉字转拼音。
生成搜索结果Array。

用法举例:

  • 默认选项的搜索:
NSArray *result = [self.tableData searchPinYinWithKeyPath:@"name" searchString:searchText];

KeyPath:用于过滤的String在Array的Object中的KeyPath。
searchString:可以是全拼,简拼和汉字,会忽略字符首尾的空白。默认开启多重搜索,既多个搜索字符用空白隔开。

  • 带有option的搜索(以下只搜索拼音,并忽略输入中的空白):
NSArray *results = [self.tableData searchPinYinWithKeyPath:@"name" searchString:searchText searchOption:SWPinyinSearchOptionsQuanPin | SWPinyinSearchOptionsJianPin];

搜索选项searchOption(NS_OPTIONS):
SWPinyinSearchOptionsHanZi:搜索汉字
SWPinyinSearchOptionsQuanPin:全拼
SWPinyinSearchOptionsJianPin:简拼
SWPinyinSearchOptionsMultiSearch:多重搜索,可以同时搜索多个字符

Latest podspec

{
    "name": "SWPinYinSearcher-JDBR",
    "version": "0.0.3",
    "summary": "fork from SWPinYinSearcher.",
    "description": "A high performance searcher fork from SWPinYinSearcher",
    "homepage": "https://github.com/jidibingren/SWPinYinSearcher",
    "license": "MIT",
    "authors": {
        "fanhuibo": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/jidibingren/SWPinYinSearcher.git",
        "tag": "0.0.3"
    },
    "source_files": [
        "SWPinYinSearcher",
        "SWPinYinSearcher/*.{h,m}"
    ],
    "public_header_files": "SWPinYinSearcher/*.h",
    "resources": "SWPinYinSearcher/*.txt",
    "requires_arc": true
}

Pin It on Pinterest

Share This