cs193p – Lecture #12 – Documents and Core Data

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

Lecture #12 contains theory only, addressing core data, managed documents, notifications and categories.

The lecture as well as its slides are available via iTunes called “12. Documents and Core Data”.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Lecture #11 – Table View and iPad

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

Lecture #11 starts with an introduction to table views, their styles and elements, how to fill theirs cells using data sources, how to react to user interactions using delegates, table segues and table spinners for refreshing.

The second theoretical part addresses universal applications adding storyboards and functionality for the iPad, as well as iPad specific controllers like the split-view controller and popovers.

The practical part of the lecture demonstrates how to use table views and split view controllers.

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

The lecture as well as its slides are available via iTunes called “11. Table View and iPad”.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Assignment #4 Extra Task #4

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

Think of some other way(s) to use animation in your application and implement it.

What happens if you shake your iPhone? The card go crazy:
Continue reading “cs193p – Assignment #4 Extra Task #4”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Assignment #4 Extra Task #3

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

Make the Set game a two player game. There’s no need to go overboard here. Think of a simple UI and a straightforward implementation that make sense.

In storyboard dublicate the set-game view controller, add a now image for the tab bar and remove the cheat button (we did not add a penalty for cheating in task #2 and it would be unfair for the two player game 😉 ) – and of course link it to the tab view contorller:

cs193p – assignment #4 extra task #3 – two-player view controller
cs193p – assignment #4 extra task #3 – two-player view controller

Continue reading “cs193p – Assignment #4 Extra Task #3”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Assignment #4 Extra Task #2

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

Knowing how to find Sets in the remaining cards also would allow you to let the user cheat. Have a button that will show them a Set (if available). It’s up to you how you want to show it, but maybe some little indicator (a star or something) on each of the 3 cards?

Add a new button to storyboard:

cs193p – assignment #4 extra task #2 – cheat button
cs193p – assignment #4 extra task #2 – cheat button

… and link to an action which stores a possible combination in a new property:
Continue reading “cs193p – Assignment #4 Extra Task #2”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Assignment #4 Extra Task #1

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

You could add better score-keeping to the Set part of this application if you can figure out an algorithm for calculating whether a Set exists in the current cards in play. Then you can penalize the user not only for mismatches, but for clicking the “deal 3 more cards” button if he or she missed a Set. You’d also know when the game was “over” (because the user would click on “deal 3 more cards” and there would be no more cards in the deck and no more Sets to choose).

The game model needs a new public method returning matching cards. For this task a method returning a boolean result would be sufficient, but we will use the same method for the next task:

- (NSArray *)findCombination;

Continue reading “cs193p – Assignment #4 Extra Task #1”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Assignment #4 Task #10

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

Use a UIDynamicAnimator to allow the cards in either game to be gathered up into a pile via a pinch gesture. Once gathered, the stack of gathered cards must be able to be moved around (via a pan gesture). Tapping on the stack will return the cards to their normal positions (animated, of course) unharmed.


Start by adding a pan and a pinch to the grid views of both game view controllers in storyboard and link them to actions in the generic game-view-controller class.

Add a new property to the game-view-controller class, which will store the current animations:

@property (strong, nonatomic) UIDynamicAnimator *pileAnimator;

Continue reading “cs193p – Assignment #4 Task #10”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail