Animation in Objective-c
A while back I was doing some native Objective C work for an iPhone app I was working on and I wanted to use sprite sheets to cut down on the amount of memory I was using. Memory use on iPhones is important, the standard native methods of animation are big memory hogs. Apple does not provide classes to read in sprite sheets, so I wrote one myself. Now this uses CALayers which is the code below UIKit. If you do not know anything about CALayer this code will seem complex stay with it… it does make sense.
Main Loop’s while programming on iOS devices in Objective-C…..
Loops on iOS devices to not tend to work very well, timers are also need not only for making games but for many programs. The main clearest and simplest options to is to use an NSTimer. These can be done as follows…
Why shouldn’t coders use under-bars at the beginning of ivariables in Objective-c
This is an interesting question simply because lots of senior programmers tell junior programmers they shouldn’t do but it, yet it seems to work. Why shouldn’t you do this? The main reason is, it’s really bad forum. If you are writing a little app for yourself, do what ever you want. You are the only person that will ever look at that code or maintain it. If you are part of a larger team this will reduce the ability to maintain the code and increase the cost of the project over time.