beginning ios6 development ch02 using xcode

Post on 19-Oct-2014

565 Views

Category:

Education

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

Beginning iOS6 Development CH02 Using Xcode

TRANSCRIPT

Using Xcode

iabdulrazzaq@outlook.com Eng. Abdulrazzaq Alnajjar1

Setting Up Your Project in Xcode

iabdulrazzaq@outlook.com Eng. Abdulrazzaq Alnajjar2

Setting Up Your Project in Xcode

• create a new project.

• Connect with existing projects.

• Open user guide.

• Go to developer.apple.com.

iabdulrazzaq@outlook.com Eng. Abdulrazzaq Alnajjar3

project template selection sheet

iabdulrazzaq@outlook.com Eng. Abdulrazzaq Alnajjar4

project options sheet

iabdulrazzaq@outlook.com Eng. Abdulrazzaq Alnajjar5

The Xcode Workspace Window

iabdulrazzaq@outlook.com Eng. Abdulrazzaq Alnajjar6

The Xcode Workspace Window

• The Toolbar

• The Navigator View

• The Jump Bar

• The Utility Pane

• Interface Builder

• New Compiler and Debugger

iabdulrazzaq@outlook.com Eng. Abdulrazzaq Alnajjar7

iabdulrazzaq@outlook.com Eng. Abdulrazzaq Alnajjar8

DemoThe Xcode Workspace Window

iabdulrazzaq@outlook.com Eng. Abdulrazzaq Alnajjar9

Introducing Xcode’s Interface Builder

iabdulrazzaq@outlook.com Eng. Abdulrazzaq Alnajjar10

What’s in the Nib File?

• It is the right place to add the objects that make up your application’s user interface.

When you create objects in Interface Builder, they’ll be instantiated in your program when that nib file is loaded

• Every nib file starts off with the same two icons:

• File’s Owner:

• First Responder

These two are created automatically and cannot be deleted.

iabdulrazzaq@outlook.com Eng. Abdulrazzaq Alnajjar11

File’s Owner & First Responder

• File’s Owner represents the object that loaded the nib file from disk. In other words, File’s Owner is the object that “owns” this copy of the nib file.

• First Responder is the object with which the user is currently interacting.

First Responder icon gives you a convenient way to communicate with whatever control or other object is the current first responder, without needing to write code to determine which control or view that might be.

iabdulrazzaq@outlook.com Eng. Abdulrazzaq Alnajjar12

iabdulrazzaq@outlook.com

• The library is where you’ll find stock objects from the UIKit that are available for use in Interface Builder.

– File template library

– Code snippet library

– Object library

– Media library

The Library

Eng. Abdulrazzaq Alnajjar13

The Library

• File template library: contains a collection of file templates to add a new file to your project.

• Code snippet library: features a collection of code snippets you can drag into your source code files.

• Object library: is filled with reusable objects, such as text fields, labels, sliders, buttons, and just about any object you would ever need to design your iOS interface.

• Media library: is for all your media, including pictures, sounds, and movies.

iabdulrazzaq@outlook.com Eng. Abdulrazzaq Alnajjar14

DemoAdding a Label to the View

iabdulrazzaq@outlook.com Eng. Abdulrazzaq Alnajjar15

Changing Attributes

iabdulrazzaq@outlook.com

• the inspector pane is topped by a series of icons, each of which changes the inspector to view a specific type of data. To change the attributes of the label, we’ll need the fourth icon from the left, which brings up the object attributes inspector.

Eng. Abdulrazzaq Alnajjar17

Finishing Touches

• Adding icon to the app

– 57 x 57 & 114 × 114 pixels .why?

– (.png) file.

– Just normal & square.

iabdulrazzaq@outlook.com Eng. Abdulrazzaq Alnajjar17

DemoAdding icon to the app

iabdulrazzaq@outlook.com Eng. Abdulrazzaq Alnajjar18

top related