- (NSString *)createCUID:(NSString *)prefix{
NSString * result;
CFUUIDRef uuid;
CFStringRef uuidStr;
uuid = CFUUIDCreate(NULL);
uuidStr = CFUUIDCreateString(NULL, uuid);
result =[NSString stringWithFormat:@"%@-%@", prefix,uuidStr];
CFRelease(uuidStr);
CFRelease(uuid);
return result;
}
希望对你有所帮助!