Assignment 1

Due on Sep 21 2012 at 11:59 PM


1. Colour Sliders

Build an app that uses sliders and input fields to set the background colour of the main view.


  • Colours are set using UIColor. Note that the range of the parameters accepted when constructing a UIColor is from 0 to 1 (not from 0 to 255).
  • You should respond to the “Did End On Exit” event triggered by the UITextField.
  • Use the resignFirstResponder method on the selected UITextField to hide the keyboard.
  • Make sure to add validation code to correct the typed in value if it’s out of bounds (less than 0 or greater than 255).


2. TIPS Calculator

Build a TIPS calculator where the result is determined from a base amount and percentage set by the user.


  • The result is equal to the amount multiplied by the percentage. In the middle example above, that would be 45.34 * 0.12 = 5.44.
  • Remember that you can format NSString using the stringWithFormat: initializer.
  • I used the UIImage, UILabel, UITextField, and UISegmentedControl in the example above, but feel free to use other components if you’d like.


3. Original Controls

Build an app that uses UI controls in an original way. For example, have a look at Slide.

Comments are closed.