7- MovingImage

7- MovingImage - Moving Image 3rd iPhone programming...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Click to edit Master subtitle style 5/7/11 Moving Image – 3rd iPhone programming CSE 390 Fall 2010
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5/7/11 Define a method header 1. Create a View-Based Application. Save the project folder to your desktop (I named my project “Wolfie”). 2. In the interface file ( WolfieViewController.h in the Classes directory) define a UIImageView object. Also define a method header for a move method. Your code
Background image of page 2
5/7/11 Add a resource and build the interface 1. Find an image and make it 160 pixels square. Drag it to the Resources folder in your project window, and be sure to check the checkbox to copy it to the destination folder. 2. Double-click the .xib folder in Resources to launch Interface Builder. Drag a UIImageView object
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5/7/11 Touch-up 1. My image has a white background, but the default background in IB is gray. I could change that in the Inspector by selecting the View window (not the image object) and choosing a different color for the background from a dropdown list in the Attributes tab. (If the image has a transparent background it will be
Background image of page 4
5/7/11 Either way, it’s OK… Animated UIView image object with alpha background UIView image object with solid background
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5/7/11 Creating motion based on random origins Our animation will start in one corner of the screen and move to another corner. The origin will be a randomly selected corner. We will generate a pseudorandom number (since it is generated by a fixed algorithm, if you generate it several times, you’ll get the same sequence of numbers). So we will
Background image of page 6
5/7/11 Seeding the random number generator
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/07/2011 for the course CSE 390 taught by Professor Scarlatos during the Fall '11 term at SUNY Stony Brook.

Page1 / 19

7- MovingImage - Moving Image 3rd iPhone programming...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online