i os presentation

15
BEGINNING OBJECTIVE-C YOU R FI RST APP!

Upload: robert-mckay

Post on 12-Jan-2015

96 views

Category:

Education


0 download

DESCRIPTION

A shameless copied presentation from http://www.raywenderlich.com/tutorials - please see the website if you enjoyed the presentation

TRANSCRIPT

Page 1: I os presentation

BEGINNIN

G OBJE

CTIVE-C

Y OU

R F

I RS

T A

PP

!

Page 2: I os presentation

ARE YOU AN IOS PADAWAN OR A JEDI MASTER?

Doesn’t matter!!

Page 3: I os presentation

SO WHAT DOES THIS ALL LOOK LIKE?

Page 4: I os presentation

WHAT YOU ARE GOING TO BE BUILDING!

Page 5: I os presentation

ENOUGH BACK STORY….YOUR FIRST APP!!What you need:

A Mac –

Xcode

Sign up for a free account:

https://developer.apple.com/programs/start/standard/

Downloading the extra stuff:

https://www.dropbox.com/s/oneio87r6oa2k4r/01%20-%20One%20Button%20App.zip

That’s it!!!

Page 6: I os presentation

WHAT YOU WILL HAVE BY THE TIME WE GET DONE!!

Page 7: I os presentation

LIST OF STUFF -

Needs a:

• Put a button on the screen and label it “Hit Me!”

• When the player presses the Hit Me button the app has to show an alert popup to

inform the player how well she did. Somehow you have to calculate the score and

put that into this alert.

• Put text on the screen, such as the “Score:” and “Round:” labels. Some of this

text changes over time, for example the score, which increases when the player

finishes a round.

• Put a slider on the screen and make it go between the values 1 and 100.

• Read the value of the slider after the user presses the Hit Me button.

• Generate a random number at the start of each round and display it on the

screen. This is the target value.

• Compare the value of the slider to that random number and calculate a score

based on how far off the player is. You show this score in the alert view.

• Put the Start Over button on the screen. Make it reset the score and put the

player back into the first round.

• Put the app in landscape orientation.

• Make it look pretty. :-)

Page 8: I os presentation
Page 9: I os presentation

TIME TO OPEN XCODE

Make sure it version 5.0 and above

If you don’t have a developer account attached yet that’s ok!!

Single View

See Xcode for the following directions:

Also make sure to link your developer account before you launch!

Page 10: I os presentation

I HIT PLAY…WHAT THE HECK JUST HAPPENED?

1) Code just compiled1)This mean it was translated from objective-c to machine code

(remember the 1’s and 0’s2) All the components were gathered together

1)Images, files, storyboards etc3) We just did a BUILD!

Page 11: I os presentation
Page 12: I os presentation

HOW AN APP WORKS!!

Page 13: I os presentation
Page 14: I os presentation
Page 15: I os presentation