1. 程式人生 > >付佳 Stay Hungry Stay Foolish

付佳 Stay Hungry Stay Foolish

iOS 生成UUID
+ (NSString *)uuidString
{
CFUUIDRef uuid_ref = CFUUIDCreate(NULL);
CFStringRef uuid_string_ref= CFUUIDCreateString(NULL, uuid_ref);
NSString uuid = [NSString stringWithString:(__bridge NSString )uuid_string_ref];
CFRelease(uuid_ref);
CFRelease(uuid_string_ref);
return [uuid lowercaseString];
}