Tuesday, October 23, 2012

iPhone Development Learning Continues

The nexus of iOS 6 and XCode compatibility settings can sometimes generate a real mess.

This exception is caused can be created by a string of seemingly benign events:

http://stackoverflow.com/questions/11085859/how-can-i-fix-nsinvalidunarchiveoperationexception


Everyone once in a while it can be very advantageous for an iPhone developer or coco2d programmer to go back over the basic concepts as a refresher and reminder:

http://www.indiedb.com/tutorials/cocos2d-working-with-sprites


There will always be times in your code that you need to detect if the current device is an iPad, and iPhone or what. This quick answer on StackOverflow does the trick for me:

http://stackoverflow.com/questions/11097362/detect-if-app-is-running-in-ipad-simulator


If you are like me, and new to Objective-C, you will probably spend a lot of time struggling with 'release' and 'autorelease' and ARC and everything else. Sometimes I get into trouble with multiple releases of memory (error message '-[CALayer retain]: message sent to deallocated instance')

http://stackoverflow.com/questions/3235949/calayer-retain-message-sent-to-deallocated-instance


A sore point for me right now is I still haven't figured out how to handle variable length generated text as gracefully as I can on Android.

http://stackoverflow.com/questions/50467/how-do-i-size-a-uitextview-to-its-content


Back to CCSprite, you will eventually need to switch the image in use by that object:

http://www.coderzheaven.com/2011/03/17/changing-the-image-of-the-sprite-in-cocos2d/


I was sad to lear that C-style string formats are fraught with bugs and ugliness:

http://stackoverflow.com/questions/1063843/is-there-a-way-to-specify-argument-position-index-in-nsstring-stringwithformat


Switching View XIB between iPhone and iPad can't be this hard ... can it? can it?

http://stackoverflow.com/questions/10459498/xcode-4-2-change-the-iphone-xib-to-ipad-xib

No comments: