Assignment #3 Task #2

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

The only variable button your calculator’s user-interface should present is x (so remove any others you added in Assignment 2 and you can remove your Test buttons and the UILabel which shows the value of the variables being used in the display).

Again inside your story board, delete the variable & test buttons as well as the label for the used variables. You might also want to rearrange the remaining buttons.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Assignment #3 Taks #1

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

The third assignment is yet a further extension of the calculator built in the previous assignments.

When your application is run on the iPhone, it must present the user-interface of your calculator from Assignment 2 inside a UINavigationController.

Just go to your storyboard, select the existing CalculatorViewController and embed it into a new UINavigationController clicking Editor -> Embed in -> Navigation Controller. Then double click the newly created navigation bar inside the CalculatorViewController and name it “Calculator”.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Friday Session #3: Getting your application running on a device

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

This weeks Friday Session is/was called “Getting your application running on a device”. This lecture does not show up on iTunes, most likely, because it describes how to use a Stanford University Developer License.

However, connecting an actual device is not too difficult, once you received your valid developer license from Apple.

In Xcode go to the Organizer (button on the upper right hand side of the screen). There you will find a tab called Devices. Now connect your iPhone/iPad to your computer … and Xcode will do the rest … or at least will tell you what to do …

… and just recently Stanford provided some notes to for this session with the mysterious name “Section 3: Developing on Devices”.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Lecture #6: Multiple MVCs and Segues

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

Lecture six is named “6. Multiple MVCs and Segues (October 13, 2011)” and can be found at iTunes. Its slides are available at Stanford.

It starts with a continuation of the demo from the second half of the previous lecture, adding features to Happiness namely delegates. The code for this demo is available directly at Stanford, and github.
Continue reading “Lecture #6: Multiple MVCs and Segues”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Lecture #5: Protocols and Gestures

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

The first lecture of the third week of the course is named “Protocols and Gestures (October 11, 2011)” and can be found at iTunes. Its slides are available at Stanford.

It starts with a theoretical part presenting

  • Autorotation,
  • Protocols and
  • Gesture Recognizers.

When a device rotates you can choose how your application should react:
Continue reading “Lecture #5: Protocols and Gestures”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Assignment #2 Extra Task #1

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

Enhance your application to show the user error conditions like divide by zero, square root of a negative number, and insufficient operands. One way to do this (and to get more experience with using id) might be to have runProgram:usingVariableValues: in CalculatorBrain return an id (instead of a double) which is an NSNumber with the result or an NSString with the description of an error if it encounters one. Then update your Controller to use introspection on the return value and display the appropriate thing to the end-user.

Mainly the API of the CalculatorBrain has to be changed from double to id:
Continue reading “Assignment #2 Extra Task #1”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail