![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Objective-C
mickysnowy
这个作者很懒,什么都没留下…
展开
-
objective-c中nonatomic作用是什么?
http://www.devdiv.com/thread-30105-1-1.html 它要与@synthesize一起使用才有意义。 atomic的意思就是setter/getter这个函数是一个原语操作。如果有多个线程同时调用setter的话,不会出现某一个线程执行setter全部语句之前,另一个线程开始执行setter情况,相当于函数头尾加了锁一样。 nonatomic不保转载 2012-04-12 15:15:02 · 700 阅读 · 0 评论 -
[objective-C]setDateFormat
NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setDateFormat:@"yyyy-MM-dd hh:mm:ss"]; //12hours [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; //24hours NSTimeZone* t原创 2012-04-11 21:46:25 · 894 阅读 · 0 评论 -
对字符串等进行MD5加密
#import ... // Function definition NSString * md5( NSString *str ) { const char *cStr = [str UTF8String]; unsigned char result[16]; CC_MD5( cStr, strlen(cStr), result ); return [NSString stringWithF转载 2012-04-12 21:38:11 · 450 阅读 · 0 评论 -
synthesize只有一个变量指针 不会分配空间
rt原创 2012-04-12 23:37:53 · 336 阅读 · 0 评论 -
Detect the current input character in UITextField(iOS)
2down votefavorite share [g+]share [fb]share [tw] I want to know the current input character the user just inputted.Comparing the old and the new input string seems to work, bu原创 2012-04-21 21:46:58 · 557 阅读 · 0 评论 -
NSUserDefaults
卸载程序后NSUserDefaults保存的程序数据消失,停止运行程序数据仍然有效。 http://blog.sina.com.cn/s/blog_4cfeda8601011mro.html NSUserDefaults类提供了一个与默认系统进行交互的编程接口。NSUserDefaults对象是用来保存,恢复应用程序相关的偏好设置,配置数据等等。默认系统允许应用程序自定义它的行为去迎合转载 2012-05-12 16:27:59 · 808 阅读 · 0 评论