Temperature Calculation Application In iPhone

This is a temperature calculation application. Its very simple example. In our application we input tempature value and it convert into fahrenheit value as well as celsius value.

Step 1: Create a new project in Xcode using View-base application.

Step 2: Double click your .xib file open it to Interface Builder . Open library and drag TextField into the View and connected File’s Owner to TextField. Drag RoundRect into the View and double click it give it to name ºC. Single click it and bring up connection inspector, control drag Touch Down to File’s Owner select fahrenheittocelsius. Do it once more, give the name ºF and select to celsiustofahrenheit. Next drag Label from library , place into the view. Connect File’s Owner to Label and  select fahrenheit.  Do once more time and  select celsius.

Step 3: Add some code in your viewcontroller header file:

 

 

 

Step 4: Now add calculation method  in the viewcontroller class:

 

 

 

Step 5: Now compile and run your application on the Simulator. (See figure 1)

Figure 1: Tempareture calculation into fahrenheit and celsius.

You can downloaded SourceCode from here TemperatureCalculation

Leave a Comment: