iOS之自动生成UUID
2015-11-03 17:17
399 查看
iOS 自动生成UUID的方法
#pragma mark -- gen_uuid()自动生成UUID NSString * gen_uuid() { CFUUIDRef uuid_ref = CFUUIDCreate(NULL); CFStringRef uuid_string_ref= CFUUIDCreateString(NULL, uuid_ref); CFRelease(uuid_ref); NSString *uuid = [NSString stringWithString:(__bridge NSString*)uuid_string_ref]; CFRelease(uuid_string_ref); return uuid; }
return uuid 就是生成的UUID了。
<img alt="微笑" src="http://static.blog.csdn.net/xheditor/xheditor_emot/default/smile.gif" />
相关文章推荐
- android ui的几个概念:px,dip(dp),sp,dpi,分辨率等
- EAS BOS代码添加F7Query
- Week1-7Linguistics
- Building fw printenv and fw setenv
- Web Service单元测试工具实例介绍之SoapUI
- Easyui的一些简单用法
- 关于论文Silhouteete-based human action recognition using sequences of key poses
- ios UITextView的placeHolder的设置
- easyUI datagrid导出excel(所见即所得)
- Codeforces Round #328 (Div. 2)B. The Monster and the Squirrel
- UITableView和UITableViewCell 图解
- Android设计模式源码解析之Builder模式
- NavigationController界面跳转,UITableView基本用法
- gitlab Sign in 报错:You have to confirm your account before continuing.
- Zoho Recruit助人力外包公司提供满意服务
- Servlet、Request、Response、filter、listener
- django 与 百度 ueditor 富文本编辑器集成
- iOS开发UI中懒加载的使用方法
- [MySQL FAQ]系列 — 线上环境到底要不要开启query cache
- Frequency Distribution