cs193p – Assignment #4 Task #2

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

Cards must have a “standard” look and feel (i.e. for Set, 1, 2 or 3 squiggles, diamonds or ovals that are solid, striped or unfilled, and are either green, red or purple; for Playing Cards, pips and faces). You must draw these using UIBezierPath and Core Graphics functions. You may not use images or attributed strings for Set cards. The drawings on the card must scale appropriately to the card’s bounds. You can use the PlayingCardView from the in-class demo to draw your Playing Card game cards.

… the cleaning continues: Remove all card buttons from your storyboard, as well as their outlet collection property and every reference to it in your code. Because the cards will now drawn remove also the methods to update the button title and background images … like before, you can leave the code parts where the are, but it might get crowded …
Continue reading “cs193p – Assignment #4 Task #2”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Assignment #4 Task #1

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

Your application this week is still required to play both the Set and Playing Card matching games (in separate tabs) and must show the score and allow re-deals, but you can remove the UI for showing the result of the last card choice as well as the History MVC added last week.

From your storyboard remove the history view controller as well as the navigation view controllers. Relink both game view controllers with the tab view controllers. Finally remove the flip-description labels:

cs193p – assignment #4 task #1 – cleanup
cs193p – assignment #4 task #1 – cleanup

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

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Lecture #10 – Multithreading, Scroll View

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

Lecture #10 starts with an introduction on multithreading mainly on how to run lengthy tasks in parallel to avoid blocking. iOS supports different APIs – where the last courses emphasized on the C-styled API this year the Objective-C API seems to be preferred.

The second part of the theory addresses scroll views, on how to create them, scrolling and zooming.

The rest of the lecture is devoted to a demonstration of multithreading and scroll views.

The code for this lecture is available at gitub. Stanford has not updated its homepage yet, I assume it will be available in short time.

The lecture as well as its slides are available via iTunes called “10. Multithreading, Scroll View”.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

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”.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

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”.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Assignment #3 Extra Task #4

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

Add yet another tab for some “settings” in the game (match bonuses, etc.).

Create new model handling the game settings (like we did already for game results). Its public interface consists of our game settings:

@property (nonatomic) int matchBonus;
@property (nonatomic) int mismatchPenalty;
@property (nonatomic) int flipCost;

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

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Assignment #3 Extra Task #3

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

Include the ability to sort the scores shown in the Extra Credit above by last played, score or game duration.

Adjust the layout and add three buttons:

cs193p – assignment #3 extra task #3 – sorting
cs193p – assignment #3 extra task #3 – sorting

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

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail