2011-07-25-Hyuk-IOS_Development - ADGC Soft

barbarousmonthΚινητά – Ασύρματες Τεχνολογίες

10 Δεκ 2013 (πριν από 3 χρόνια και 3 μήνες)

65 εμφανίσεις

Hyuk Ho Song

AD Group Communique

7 / 27 / 2011

iOS Development

Tools


Xcode 4
-

Objective
-
C


Dreamweaver 5.5
-

HTML5, CSS3, JavaScript >> PhoneGap


Flash Builder 4.5 and Flex 4.5
-

MXML, ActionScript3.0


Flash 5.5
-

ActionScript3.0 >> Swiffy (Google API)

Xcode 4

Xcode 4

//SimpleCalculatorViewController.h


#import <UIKit/UIKit.h>


@interface SimpleCalculatorViewController : UIViewController {


float result;


IBOutlet UILabel *calculatorScreen;


int currentOperation;


float currentNumber;

}


-
(IBAction)buttonDigitalPressed:(id)sender;

-
(IBAction)buttonOperationPressed:(id)sender;

-
(IBAction)cancelInput;

-
(IBAction)cancelOperation;



@end

//SimpleCalculatorViewController.m


#import "SimpleCalculatorViewController.h"


@implementation SimpleCalculatorViewController


-
(IBAction)buttonDigitalPressed:(id)sender{


currentNumber=currentNumber*10+(float)[sender tag];


calculatorScreen.text=[NSString stringWithFormat:@"%2f", currentNumber];

}


-
(IBAction)buttonOperationPressed:(id)sender{


if(currentOperation==0) result=currentNumber;


else{


switch (currentOperation) {


case 1:


result=result + currentNumber;


break;


case 2:


result=result
-

currentNumber;


break;


case 3:


result=result * currentNumber;


break;


case 4:


result=result / currentNumber;


break;


case 5:


currentOperation=0;


break;


}


}


currentNumber=0;


calculatorScreen.text=[NSString stringWithFormat:@"%2f",result];


if([sender tag]==0)


result=0;


currentOperation=[sender tag];

}


-
(IBAction)cancelInput{


currentNumber=0;


calculatorScreen.text=@"0";

}


-
(IBAction)cancelOperation{


currentNumber=0;


calculatorScreen.text=@"0";


currentOperation=0;

}

Touch Down

PhoneGap

jQuery Mobile
,
Sencha Touch
,
Jo
,
Sproutcore
,
XUI
,
jQTouch

PhoneGap

DOWNLOAD

INSTALL

PROJECT

RUN

COPY WWW

MODIFY

DONE

PhoneGap

<body onload="onBodyLoad()">


<canvas id="myCanvas" width="200" height="100">hi</canvas>



<script type="text/javascript">


var c=document.getElementById("myCanvas");


var cxt=c.getContext("2d");


cxt.fillStyle="#FF0000";


cxt.fillRect(0,0,150,75);


</script>


</body>

Links


http://developer.apple.com/xcode/


http://www.phonegap.com/


http://www.cocos2d
-
iphone.org
/


http://www.photoswipe.com
/


http://maniacdev.com