cs193p – Lecture #12 Dynamic Animation

Please note, this blog entry is from a previous course. You might want to check out the current one.

The twelfth lecture addresses a different approach to animation, creating sets of behaviors defining how items should interact with each other and the environment.

First we create an animator inside a reference view:

var animator = UIDynamicAnimator(referenceView: UIView)

Continue reading “cs193p – Lecture #12 Dynamic Animation”

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmailFacebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Flattr this!

cs193p – Lecture #9 – Animation and Autolayout

Please note, this blog entry is from a previous course. You might want to check out the current one.

Lecture #9 starts with a demo continuing the dropit app from the previous lecture.

The rest of the lecture is devoted to autolayout and different ways how constraints can be defined followed by another short demonstration.

The code for this lecture is available at github for dropit and attributor as well as from Stanford.

The lecture as well as its slides are available via iTunes called “9. Animation and Autolayout”.

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmailFacebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Flattr this!

cs193p – Lecture #8 – Protocols, Blocks, and Animation

Please note, this blog entry is from a previous course. You might want to check out the current one.

Though lecture #8 starts with a huge theory part.

Protocols are a way of communication between unrelated projects, in iOS mainly used for delegates and data sources. A protocol declares which properties and methods can or have to exist in another class to be accessible by the declaring class.

Blocks encapsulate pieces of code which can be passed like objects. Special care has to be taken when the code inside blocks needs to access variables or objects outside the block.

Animating views can be done by animating its properties directly or – new in iOS 7 – physics based. When animating the properties of a view you provide the timing and the end state. For dynamic animation you define the physics of your view and its contents.

The end of the lecture is a demo explaining dynamic animation in more detail.

The code for this lecture is available at github as well as from Stanford.

The lecture as well as its slides are available via iTunes called “8. Protocols, Blocks, and Animation”.

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmailFacebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Flattr this!