Placeholder Image

字幕列表 影片播放

  • hey guys what's up it's chris from code with chris dot com

  • here with your very first

  • video series

  • called how to build your first iphone application

  • and my goal with this YouTube channel is

  • exactly like it sounds to teach you guys how to build iPhone and iPad apps

  • this first video series

  • is going to teach you guys the basic skills and get you guys familiar with

  • xcode

  • it's going to be about

  • eight videos long i think

  • and by the end of it

  • you're going to know

  • basic skills like

  • creating buttons and

  • creating composite views

  • learning what

  • app architecture means in iOS

  • uh... how to hook up handlers and using delegates and stuff like that

  • so

  • in this particular video we're actually going to

  • take a look at what we will be building for the next eight or ten videos; I have the demo

  • ready

  • and i will tell you guys where to download XCode, so you can

  • get your environment setup

  • and then we will

  • go and set up on our first XCode project

  • so let's get started!

  • So this is a demo of what we will be building. It's a dice roll simulator

  • and as you can see, all that does when you click the roll button is

  • randomly generate

  • two random numbers between one to six and then

  • show their dice representation on the screen

  • So it's a pretty simple application but it's going to serve the purpose of

  • teaching you the basics of iOS app architecture

  • some objective c basics as well as

  • getting familiar with the xcode so by the end of

  • this video tutorial series

  • you're going to know how to handle button clicks

  • and how to build an iphone view comprised of smaller views, you're going

  • to know how to load images

  • and

  • show text labels

  • stuff like that

  • in terms of environment, you don't even need

  • an actual iOS device at this point. All you really need is a Mac.

  • You need to download XCode which is free

  • and as you can see during your development phase you can use this

  • simulator that comes with XCode

  • to

  • to load up your app to see how it's working and stuff and

  • it comes with

  • all sorts of cool features like you can rotate it you can you can

  • simulate shake, you can simulate memory warnings and

  • you can even

  • you can even put in a custom location

  • if you wanted to debug

  • GPS specific functionalities.

  • Okay so

  • the easiest way to get XCode is to download it from the app store

  • you can search for XCode and it's gonna show up as first result

  • If you

  • don't have the Mac App Store for any reason you can still download

  • the

  • image.

  • So all you need to do is

  • hit this URL right here.

  • You're going to have to sign up for a

  • a free

  • developer account

  • and

  • once you do you're going to be able to access this page and download

  • this image right here.

  • XCode 4.5.2 is the latest one.

  • So once you have xcode installed

  • let's go ahead and launch it

  • and make sure you pull down the menu here

  • and go to "About XCode" just to doublecheck what version you're running.

  • As of the time of this video, the latest version is 4.5.2

  • And just make sure you're not running anything older than that

  • because sometimes your Mac may come pre-installed with

  • XCode. Or maybe you've bought a used mac which already has xcode

  • and then sometimes

  • you'll have two icons and you'll end up using the wrong one.

  • So just make sure you're using the latest version.

  • And when you launch XCode you may see a welcome to XCode menu.

  • In my case i don't have that

  • but if you do have that you're gonna see a button that says "create new project".

  • so go ahead and click that. For me, i'm going to go through the menu system

  • which will be the same thing so i'm gonna create new project here

  • It's going to bring up a window

  • that allows you to select a couple of templates just a start off your

  • iOS project.

  • and make sure that you're under the iOS heading

  • and under "Application"

  • so there's a bunch of different

  • templates you can use and you might recognize some of them especially

  • the tabbed application which is very common in the app store

  • but for our

  • demo dice roll app, we're going to use a single view application.

  • Here you're specifying a couple properties for your project. You can

  • change these later but

  • for now,

  • give your demo app a name. I'm going to name mine "iPhone App Tutorial"

  • For organization, you can put your own name and for company identifier

  • this is going to be really important when you start to deploy your applications

  • to devices and stuff like that

  • because

  • once we get into provisioning and

  • basically setting up our app

  • to deploy our on real devices

  • it's going to matter.

  • What this is, is going to matter. Normally, the convention is going to be a

  • top level identifier

  • and then a secondary one and finally your app name.

  • You can select

  • what type of devices you want this to run on

  • and again

  • selecting one doesn't mean that

  • it won't be able to run on

  • the other.

  • You can always tweak these settings in the build settings,

  • the project properties later.

  • And what's more is that, let's say I select

  • iPhone and then I wanted to

  • also allow this run on iPad to have iPad specific views, i could definitely

  • add iPad specific views and change my project settings later to allow it to run

  • on iPad. So don't feel like this is set in stone.

  • But for our demo we're going to select iphone.

  • We're going to leave

  • "use storyboards" checked off.

  • And maybe in the future, i'll do a tutorial on how to use story boards.

  • You definitely want to have "use automatic reference counting" checked.

  • You guys might have heard

  • back then before

  • iOS5,

  • developers

  • had to manage their own memory and that was a huge barrier for people learning

  • objective c and iphone/ipad development but nowadays, we can have

  • xcode automatically do that for us so

  • go ahead and have that checked off and you can leave unit tests

  • checked.. unchecked i mean.

  • Click next; its going to ask you where to save it

  • and

  • there we go! We have our project created.

  • By default it's going to dump everything in the root folder and i usually like to

  • organize this a little bit better.

  • I think I'll go through that in the next video.

  • For now, all i want you guys to do is

  • in this top menu right here

  • choose iphone 6 simulator and then just hit "Run"

  • to see that simulator pop up and see your app.

  • So there you go,

  • you don't have anything in this application right now so it's showing you an empty

  • screen.

  • But that's

  • pretty much our "hello world".

  • So i'm gonna end the video off there

  • and look forward to the next one where i will

  • it'll probably be about showing you guys

  • all the different parts of xcode

  • and getting you familiar with that and maybe revising some of how

  • this is structured here and organizing the project.

  • Alright until next time;

  • Make sure to comment and subscribe.

  • Comment especially if you have some questions and you have stuff you don't

  • understand. That's where i'll be checking and answering your questions.

  • And please follow along if you want to get the most out of this.

  • Okay until next time. Bye!

hey guys what's up it's chris from code with chris dot com

字幕與單字

單字即點即查 點擊單字可以查詢單字解釋

A2 初級

如何建立iPhone應用程序 - S01E01:介紹,演示應用程序和安裝XCode (How To Build iPhone Apps - S01E01: Introduction, Demo App and Installing XCode)

  • 38 3
    Jeffrey Su 發佈於 2021 年 01 月 14 日
影片單字