iTunesU Viewers

Good news! Fall (2013-2014) quarter's lectures (based on iOS 7) are available on iTunesU.

The website you are looking at (http://cs193p.stanford.edu) was retired a couple of years ago, but evidently iTunesU folks still need it for demo code downloads, so we'll continue to post that stuff here.

Please do not repost from this website on other websites--these downloads are for the individual use of those of you watching the course on iTunesU. Enjoy!

If you are still watching the iOS 6-based Winter quarter from last year, the demo code downloads can be found here.

Lecture 18: Localization and Settings

Internationalization of Photomania and adding Elasticity to the Settings application for Bouncer.

Downloads

Lectures 16 & 17: Modal & Unwind Segues, Alerts, Core Location, Image Picker, Action Sheet, Core Motion

Includes code for Action Sheet in Photomania not demoed in lecture.

Added doubleTap to restart a Bouncer game.

Downloads

Lecture 15: MapKit + Manual and Embed Segues

Files that were changed in today's lecture are grouped together in the Xcode project under "Modified in Lecture 15."

Downloads

Lecture 14: Popover Segue

Some comments added here and there.

Note that when we copy/paste at the end of lecture from the iPad storyboard back to the iPhone storyboard we CAN copy/paste the URL-showing scene too if we want, even though it is in a popover. When we do so, the segue will go from being a Popover segue to being "Unknown" (because there is no Popover on a phone, only on the iPad). No problem, just inspect that segue and change it from Unknown to Push (this has been done in the posted code below). It will all just work! Possibly this is not the best UI for showing the URL on a phone, but it is serviceable.

Downloads

Lecture 13: Core Data

You will find this demo code invaluable for doing Assignment 6. Also attached here is the extremely necessary CoreDataTableViewController .

Downloads

Lecture 11: Table View and iPad

At Stanford, we prohibited students from using Shutterbug as the starting point for their Assignment 5 (in other words, they had to start Assignment 5 with File->New->Project ... in Xcode, but could then use the code from Shutterbug if they wished) and we also did not allow them to copy/paste from Imaginarium's or Shutterbug's storyboard (so they'd get the experience of building the storyboard from scratch).

Downloads

Lecture 10: Scroll View & Image View

Imaginarium demo (with a few comments added).

Downloads

Lecture 9: More Animation

Two versions of the demo here.

Dropit Attach is simply the code from lecture.

Dropit Align is a bonus posting which has a rudimentary alignment algorithm in DropitBehavior which causes a block involved in a collision to continue to move horizontally (based on its linear velocity) until it lines up with the grid. This is posted just so you can see how a collision delegate works and how one might get physics information about items out of a UIDynamicItemBehavior. A little bit contrived, we'll admit.

Downloads

Lecture 8: Animation

The reason that the row "explosion" was occasionally not working at the end of lecture is that our stacks of blocks were too "tippy" and it was taking a long time for the animation to settle down. We'll address that when we continue this demo next time by making the blocks more stable (not letting them rotate).

Downloads

Lecture 7: Custom Views

You will have to provide your own Card Model files (from Matchismo) for this demo to work. Just drag them into the SuperCard project and build.

Downloads

Lecture 6: Multiple MVCs

The code for this was touched up a bit after lecture to build properly on 64-bit systems (index variable in characterWithAttribute: and the stringWithFormat: calls). We'll endeavor to make the demo code correct for 64-bit systems, but occasionally we'll fall down on the job (apologies in advance for that) because we always build for the 3.5-inch (thus, non-64-bit) iPhone for screen real estate reasons.

Downloads

Lecture 5: Attributed Strings

Included below is the code for the attributed strings demo Attributor.

No code for the other short demo (breaking the card game up into abstract and concrete Controllers), but that should be easily reproducible from lecture.

Downloads