10- Input_Output

10- Input_Output - Input and Output 5th iPhone programming...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Click to edit Master subtitle style 5/7/11 Input and Output - 5th iPhone programming CSE 390 Fall 2010
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5/7/11 A little background… Last summer, to celebrate our 25th wedding anniversary, we took the family on the ferry across the Bay of Fundy from Bar Harbor, Maine, to Yarmouth, Nova Scotia. We took the
Background image of page 2
5/7/11 Design and resources I thought this could be a fairly simple app. It would have an input field to enter your driving speed, a button to convert mph to kph, a button to convert kph to mph, and an output field to give you the result. Just to make the app more graphically interesting, I thought the buttons should look like the speed limit signs typical of the US and Canada. I also realized that these elements would have to fit in the top half of the screen to allow room for a keypad to enter the driving speed.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
5/7/11 Setting up 1. I created a View-Based Application project in Xcode. 2. In the ViewController.h file I needed to create some objects to work with, namely two fields (input and output), two buttons, and two labels (for the buttons). I added one more label to display a message as well. The objects inherit their methods
Background image of page 4
5/7/11 ViewController.h code #import <UIKit/UIKit.h> @interface MPHconverterViewController : UIViewController { IBOutlet UIButton * toMiles ; IBOutlet UIButton * toKilos ; IBOutlet UITextField * input ; IBOutlet UITextField * output ; IBOutlet UILabel * mph ; IBOutlet UILabel * kph ; }
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 16

10- Input_Output - Input and Output 5th iPhone programming...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online