Latest 1.0.2
Homepage https://github.com/c6357/YUChineseSorting
License MIT
Platforms ios 6.0, requires ARC
Authors

image

pod ‘YUChineseSorting’, ‘~> 1.0.2’

    -> YUChineseSorting (1.0.2)
    iOS通讯录联系人列表较完整(中文排序)
    pod 'YUChineseSorting', '~> 1.0.2'
     - Homepage: https://github.com/c6357/YUChineseSorting
     - Source:   https://github.com/c6357/YUChineseSorting.git
     - Versions: 1.0.2 [master repo]

一.导入头文件#import

二.使用示例

NSArray *stringsToSort=[NSArray arrayWithObjects:
                        @"¥hhh, .$",@" ¥Chin ese ",@"开源中国 ",@"www.oschina.net",
                        @"开源技术",@"社区",@"开发者",@"传播",
                        @"2014",@"a1",@"100",@"中国",@"暑假作业",
                        @"键盘", @"鼠标",@"hello",@"world",@"b1",
                        nil];

self.indexArray = [ChineseString IndexArray:stringsToSort];
self.letterResultArr = [ChineseString LetterSortArray:stringsToSort];

log

效果图

三.注意
因为中文排序里面有c的文件 pinyin.c

plan 1:

pch文件如下
例如:

  #ifdef __OBJC__
  #import "AppDelegate.h"
  #endif

  __OBJC__表示宏内引用的文件确保只被使用Objective-C语言的文件所引用,保证引用关系的清晰。

plan 2 :

pinyin.c 改为pinyin.m

Latest podspec

{
    "name": "YUChineseSorting",
    "version": "1.0.2",
    "summary": "iOSu901au8bafu5f55u8054u7cfbu4ebau5217u8868u8f83u5b8cu6574(u4e2du6587u6392u5e8f)",
    "homepage": "https://github.com/c6357/YUChineseSorting",
    "license": "MIT",
    "authors": {
        "BruceYu": "[email protected]"
    },
    "platforms": {
        "ios": "6.0"
    },
    "source": {
        "git": "https://github.com/c6357/YUChineseSorting.git",
        "tag": "1.0.2"
    },
    "source_files": "YUChineseSorting/ChineseSorting/**/*.{h,c,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This