duduWang20
duduWang20
添加了一个任务调度器,降低不必要的渲染,节省cpu、gpu资源
YYModel实现了json的健值对与对象属性之间的双向映射,最基本的操作就是健值对转化为模型属性和其反向操作,使用instruments我们也可清晰的观察到双向转化占用了很大的时间比例。 下面只讨论json到对象的单向映射,在问题域上有下面7个基本问题需要考虑: 1)健值对与属性的映射是单射还是多射? 2)在嵌套的健值模型中,如何实现多层json结构扁平化? 3)在嵌套的健值模型中,如何把内层的复杂结构映射到当前模型的模型属性上? 4)如何实现多态映射? 5)如何根据json外层数据实现下层json的多态映射? 6)如何在模型转化的过程中清洗数据? 7)在OOP范式下YYModel还有什么设计缺陷吗?
#311
+ (instancetype)classInfoWithClass:(Class)cls { if (!cls) return nil; static CFMutableDictionaryRef classCache; static CFMutableDictionaryRef metaCache; static dispatch_once_t onceToken; static dispatch_semaphore_t lock; dispatch_once(&onceToken, ^{ classCache = CFDictionaryCreateMutable(CFAllocatorGetDefault(), 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); metaCache = CFDictionaryCreateMutable(CFAllocatorGetDefault(),...
If UIApplicationDidReceiveMemoryWarningNotification is posted while the app is in the background , calling [GPUImageFramebufferCache purgeAllUnassignedFramebuffers] may cause app crash . Just exit(0) is a better choice . Here is the...
Recently , i want to use cocos2d-x to write a cross-platform app , ios android . But i want know " Can this lib be used to publish app to...