Book Image

Application Development in iOS 7

By : Kyle Begeman
Book Image

Application Development in iOS 7

By: Kyle Begeman

Overview of this book

Table of Contents (15 chapters)
Application Development in iOS 7
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Behavior properties


Almost all behaviors have multiple properties that can be adjusted to the desired effect. A good example is the gravity behavior. We can adjust its angle and magnitude. Add the following code before adding the behavior to the animator:

gravity.magnitude = 0.1f;

Run the application and test it to see what happens. The picture view will start to fall; however, this time it will be at a much slower rate. Replace the preceding code line with the following line:

gravity.magnitude = 10.0f;

Run the application, and this time you will notice that the image falls much faster. Feel free to play with these properties and get a feel for each value.