NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys: |
[NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, |
[NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil]; |
Tuesday, November 24, 2009
CoreData Lightweight Migration
I have been dreading my CoreData migration for a while now. I just jumped into the documenation and found this little chestnut.
I added the new models and attributes to my model. No data needed to be migrated across entities and no entities or attributes needed to be renamed. Viola, easy migration. Phew.
OpenGL and UIKit
Just recently I finished a cover flow like control. I used the OpenGL implemention from Chaos in Motion (http://www.chaosinmotion.com/flowcover.m). I layered UIKit ontop of the OpenGL. Surprisingly or maybe unsurprisingly it runs really fast on my iPhone 3GS. At the iPhone tech talk in London, Schaffer dropped on the group that it is okay to do this. Just not the other way around. Because of the composite nature of UIKit the drawing doesn't take a huge hit when rendered on top of one OpenGL layer. Do this with many OpenGL layers and that's another story. I did my best to implement just about every UIKit feature I could think of on top of Chaos In Motions OpenGL layer. Very slick and cool. Will post the project later.
Thursday, November 12, 2009
NSURLConnection with compression
Great link here http://www.bigevilempire.com/codelog/entry/nsurlconnection-with-gzip/ about compressing NSURLConnection data with gzip. NSURLConnection also handles decompression behind the scenes. The only problem is it isn't turned on by default. This could have a massive impact when receiving large data sets or images.
Subscribe to:
Posts (Atom)