MovingBall Application In iPhone

This is a simple application MovingBall. In this application Balls are moving on the screen.

Step 1: Create a new project in Xcode using View-base application.

Step 2: Add some code in your viewcontroller header file:




Step 3: Double click your .xib file and open it to Interface Builder. Open view icon bring up attribute and change the background color . Next connect File’s Owner icon to the View icon. Now save it, and go back to Xcode.

Step 4: In the viewDidLoad, we set background color, load the image , set the timer.




Step 5: Now compile and run your application on the Simulator. (See figure 1)

Figure 1: MovingBall ApplicationĀ 

You can downloaded SourceCode from here MovingBall 2

Leave a Comment: