Top Banner
Using Xcode [email protected] Eng. Abdulrazzaq Alnajjar 1
18

Beginning iOS6 Development CH02 Using Xcode

Oct 19, 2014

Download

Education

Beginning iOS6 Development CH02 Using Xcode
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Beginning iOS6 Development CH02 Using Xcode

Using Xcode

[email protected] Eng. Abdulrazzaq Alnajjar1

Page 2: Beginning iOS6 Development CH02 Using Xcode

Setting Up Your Project in Xcode

[email protected] Eng. Abdulrazzaq Alnajjar2

Page 3: Beginning iOS6 Development CH02 Using Xcode

Setting Up Your Project in Xcode

• create a new project.

• Connect with existing projects.

• Open user guide.

• Go to developer.apple.com.

[email protected] Eng. Abdulrazzaq Alnajjar3

Page 4: Beginning iOS6 Development CH02 Using Xcode

project template selection sheet

[email protected] Eng. Abdulrazzaq Alnajjar4

Page 5: Beginning iOS6 Development CH02 Using Xcode

project options sheet

[email protected] Eng. Abdulrazzaq Alnajjar5

Page 6: Beginning iOS6 Development CH02 Using Xcode

The Xcode Workspace Window

[email protected] Eng. Abdulrazzaq Alnajjar6

Page 7: Beginning iOS6 Development CH02 Using Xcode

The Xcode Workspace Window

• The Toolbar

• The Navigator View

• The Jump Bar

• The Utility Pane

• Interface Builder

• New Compiler and Debugger

[email protected] Eng. Abdulrazzaq Alnajjar7

Page 8: Beginning iOS6 Development CH02 Using Xcode

[email protected] Eng. Abdulrazzaq Alnajjar8

Page 9: Beginning iOS6 Development CH02 Using Xcode

DemoThe Xcode Workspace Window

[email protected] Eng. Abdulrazzaq Alnajjar9

Page 10: Beginning iOS6 Development CH02 Using Xcode

Introducing Xcode’s Interface Builder

[email protected] Eng. Abdulrazzaq Alnajjar10

Page 11: Beginning iOS6 Development CH02 Using Xcode

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.

[email protected] Eng. Abdulrazzaq Alnajjar11

Page 12: Beginning iOS6 Development CH02 Using Xcode

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.

[email protected] Eng. Abdulrazzaq Alnajjar12

Page 13: Beginning iOS6 Development CH02 Using Xcode

[email protected]

• 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

Page 14: Beginning iOS6 Development CH02 Using Xcode

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.

[email protected] Eng. Abdulrazzaq Alnajjar14

Page 15: Beginning iOS6 Development CH02 Using Xcode

DemoAdding a Label to the View

[email protected] Eng. Abdulrazzaq Alnajjar15

Page 16: Beginning iOS6 Development CH02 Using Xcode

Changing Attributes

[email protected]

• 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

Page 17: Beginning iOS6 Development CH02 Using Xcode

Finishing Touches

• Adding icon to the app

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

– (.png) file.

– Just normal & square.

[email protected] Eng. Abdulrazzaq Alnajjar17

Page 18: Beginning iOS6 Development CH02 Using Xcode

DemoAdding icon to the app

[email protected] Eng. Abdulrazzaq Alnajjar18