随机产生一个汉字

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

        NSInteger i =  arc4random()%(0x9fa5-0x4e00 + 1) + 0x4e00;
        NSString * unicodeStr = [NSString stringWithFormat:@"\"\\U%lx\"", i];
        NSData *tempData = [unicodeStr dataUsingEncoding:NSUTF8StringEncoding];
        NSString* randomStr = [NSPropertyListSerialization propertyListFromData:tempData
                                                              mutabilityOption:NSPropertyListImmutable
                                                                        format:NULL
                                                              errorDescription:NULL];
        NSLog(@"%@", randomStr);