- 博客(7)
- 收藏
- 关注
转载 Grand Central Dispatch
什么是GCD? Grand Central Dispatch或者GCD,是一套低层API,提供了一种新的方法来进行并发程序编写。从基本功能上讲,GCD有点像NSOperationQueue,他们都允许程序将任务切分为多个单一任务然后提交至工作队列来并发地或者串行地执行。GCD比之NSOpertionQueue更底层更高效,并且它不是Cocoa框架的一部分。 除了代码的平行执行能力,GC
2013-08-26 12:07:41 890
原创 Property attributes
There are many attributes for property as follows: atomic: Is default behavior will ensure the present process is completed by the cpu, before another process access the variable not fast
2013-08-26 11:39:22 575
原创 NSDate conversion utilities
// Gets UTC NSDate from DateTime(.Net/WCF). + (NSDate *)fromDateTime:(NSString *)dateTime { NSDate *utcDate; if ([dateTime isMemberOfClass:[NSNull class]]) { utcDate = nil; } else
2013-08-23 17:21:50 1066
原创 Solution for "De-serialization exception: Unable to find assembly xxxxx"
public static object DeSerialize(string fileName) { BinaryFormatter formatter = new BinaryFormatter(); // *** Force Assembly resolving code to fire so we can load the assemb
2013-08-22 15:03:27 1105
原创 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(), ^{ [_tableVC.tableView rel
2013-08-20 15:19:00 758
原创 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:(NSDictionary *)item; - (id)proxyForJso
2013-08-20 15:05:02 973
原创 Conversion between json and object
public static string ObjToJson(T obj) { DataContractJsonSerializer serializer = new DataContractJsonSerializer(obj.GetType()); string retVal = Constant.strNullString;
2013-08-20 14:28:28 908
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人