How do I go about tackle optimizing my application for the iPhone
I am making a drawing application and I want make my code more readable and more efficient in the sense that I want the code to end up being faster and more responsive and lightweight. If you could lead this noob in the right direction then that 开发者_开发百科would be wonderful.
I would recommend using Clang Static Analyzer to check your code for leaks. It is easier than the Instruments tools and very efficient. Apple includes Clang Static Analyzer with Xcode now on Snow Leopard. You can download it and use it on Leopard is easy.
The Clang Static Analyzer website has the binary and instructions. To use it you navigate to your source directory and run two commands:
xcodebuild clean
scan-build -k -V xcodebuild
The results come up in a web browser. It helps you write very efficient code.
Hope this helps!
Take a look at Instruments and Shark. These are your best tools for figuring out where your application is misusing its resources. As for readability, there are many schools of thought there; the goal is to make your code maintainable.
精彩评论