08 2013 档案
Grand Central Dispatch
摘要:什么是GCD?Grand Central Dispatch或者GCD,是一套低层API,提供了一种新的方法来进行并发程序编写。从基本功能上讲,GCD有点像NSOperationQueue,他们都允许程序将任务切分为多个单一任务然后提交至工作队列来并发地或者串行地执行。GCD比之NSOpertionQ... 阅读全文
posted @ 2013-08-26 12:07 chuwachen 阅读(176) 评论(0) 推荐(0)
Property attributes
摘要:There are many attributes for property as follows:atomic:Is default behaviorwill ensure the present process is completed by the cpu, before another pr... 阅读全文
posted @ 2013-08-26 11:39 chuwachen 阅读(138) 评论(0) 推荐(0)
NSDate conversion utilities
摘要:// Gets UTC NSDate from DateTime(.Net/WCF).+ (NSDate *)fromDateTime:(NSString *)dateTime { NSDate *utcDate; if ([dateTime isMemberOfClass:[NSNul... 阅读全文
posted @ 2013-08-23 17:21 chuwachen 阅读(123) 评论(0) 推荐(0)
Solution for "De-serialization exception: Unable to find assembly xxxxx"
摘要:public void DeSerialize() { BinaryFormatter formatter = new BinaryFormatter(); AppDomain.CurrentDomain.AssemblyResolve += n... 阅读全文
posted @ 2013-08-22 15:03 chuwachen 阅读(237) 评论(0) 推荐(0)
reloadData should be in main thread
摘要:reloadData should be called in main thread, so if you call it in work thread, you should call it as follows: dispatch_async(dispatch_get_main_queue(),... 阅读全文
posted @ 2013-08-20 15:19 chuwachen 阅读(125) 评论(0) 推荐(0)
Conversion between json and object using SBJson lib
摘要:Define two methods in an object class as follows:@interface MyObject : NSObject@property (nonatomic,copy) NSString *property;- (id)initWithJson:(NSDic... 阅读全文
posted @ 2013-08-20 15:05 chuwachen 阅读(106) 评论(0) 推荐(0)
Conversion between json and object
摘要:public static string ObjToJson(T obj) { DataContractJsonSerializer serializer = new DataContractJsonSerializer(obj.GetType()); ... 阅读全文
posted @ 2013-08-20 14:28 chuwachen 阅读(141) 评论(0) 推荐(0)