13
Exploring the iTools ’ A start to iPhone Application Development

Exploring iTools

Embed Size (px)

DESCRIPTION

A start to iPhone Application Development- iTools

Citation preview

Page 1: Exploring iTools

Exploring the ‘ iTools ’

A start to iPhone Application Development

Page 2: Exploring iTools

Apple Developer Suite:

Apple Developer Suite includes 3 applications:

Xcode

Interface Builder

iPhone Simulator

These three provide all the iTools needed to design,

develop and test the iPhone applications.

Page 3: Exploring iTools

XCODE is the Integrated Development Environment

that let us create and manage iPhone applications.

Getting Started-

Create a new project,

File -> New -> Project or (Shift + Command + N)

Select a Single View Template from any of the options (as

shown in Screenshot)

Exploring the ‘XCODE’

Page 5: Exploring iTools

Make sure Application item under ‘iOS’ is selected in the left

panel, then Click Next.

Now, We need to choose a Product and Organisation name

for the project.

Make sure ‘iPhone’ is selected in ‘Device’ option, then Click

Next.

Then choose a path to save the project on the hard drive.

Page 7: Exploring iTools

Creating a First Program :

A set of groups and files are created automatically when we proceed to the next page, which includes headers, images, controllers , etc.

The MessAppDelegate.m page includes all the default methods which are used by iPhone default functionality, like terminating an app, loading an app, etc.

The MainStoryboard.storyboard page represents the view page for iPhone applications, which is displayed by the help of content in MessViewController.m

Page 8: Exploring iTools

Find and select MessViewController.m that includes functions responsible for displaying the Application content.

Page 9: Exploring iTools

The screenshot shows how storyboard page will look like.

The main function that is first loaded when an application is started is - (void) viewDidLoad

Page 10: Exploring iTools

The following code needs to be written in the - (void)viewDidLoad function.

We need to enter the following lines of code to display “Hello World” on an iPhone Screen.

UILabel *myMessage; //Defiines a variable

myMessage=[[UILabel alloc] //allocates memory and sets position on screen

initWithFrame:CGRectMake(10.0,100.0,300.0,50.0)];

myMessage.text=@" Hello World !"; // Any Text

myMessage.backgroundColor=[UIColor redColor]; // Sets the background color

[self.view addSubview:myMessage]; //Add the variable myMessage to the view

Page 11: Exploring iTools

Using iPhone Simulator

After we have completed with the code part. We need to run the app and test.

For that, we either need an iOS device or iPhone Simulator. iPhone Simulator is great deal to test the app because we don’t need to install the modified app again and again on the physical device, which is the case if we test with iOS device.

Using iPhone Simulator, displays the app exactly as it should display it on an actual iPhone.

Page 12: Exploring iTools

The application is shown running in the iPhone Simulator in the screenshot

Page 13: Exploring iTools

Netgains America has been serving selflessly from over a decade, to clients all over the world, with its

gamut of services ranging from Web Design, Development to iPad and iPhone Applications. Just visit our website www.netgainsamerica.com for an overview

of our services and feel free to contact us any time.