home

Friday, March 16, 2012

temp converter

Before you make temp converter,you would like to see the first tutorial

In this tutorial I would like to show you how to make a simple temperature converter unit. The basic formula in this case is


C=(F-32).5/9

c = celsius, F = Fahrenheit
Celsius equal (Fahrenheit - 32) multiplied by 5/9

And step by step how to make this apps 

1. Open Xcode and create a new project. Choose a single view apps and Fill the product name = converter,company identifier = name of your company, class prefix = leave it blank, device family= iphone or ipad or universal, and use Storyboard then press Next button
2.For ease you could create and place your project on your dekstop,then you will see the first page of Xcode like the image below



Press the main Storyboard 

3. After that for the next page you will see on your storyboard like an image below, we could change the background image from default to another background on the right side 



4. Drag and drop two label buttons, two text buttons, and one button in to storyboard,then change those label to Fahrenheit and Celsius,leave the text button blank,and change the button to Convert button 



5. Then insert the code to ViewController.h, on the text button please click right at your mouse----->hold then drag and drop below the code 

#import <UIKit/UIKit.h>

@interface ViewController : UIViewController 


6. Fill the name of the text label (Fahrenheit and Celsius) you could see the image below then press connect


*NOTE =
connection = Outlet
name = Fahrenheit and Celsius
Type = UITextField 




7. And also the convert button fill the name of it. Change the button to Action 





continued on part two


/>

No comments:

Post a Comment