Upload
robert-mckay
View
100
Download
0
Embed Size (px)
DESCRIPTION
A shameless copied presentation from http://www.raywenderlich.com/tutorials - please see the website if you enjoyed the presentation
Citation preview
BEGINNIN
G OBJE
CTIVE-C
Y OU
R F
I RS
T A
PP
!
ARE YOU AN IOS PADAWAN OR A JEDI MASTER?
Doesn’t matter!!
SO WHAT DOES THIS ALL LOOK LIKE?
WHAT YOU ARE GOING TO BE BUILDING!
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!!!
WHAT YOU WILL HAVE BY THE TIME WE GET DONE!!
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. :-)
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!
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!
HOW AN APP WORKS!!