Placeholder Image

字幕表 動画を再生する

  • What's up, guys?

  • Is Forest Night broken?

  • Ida Journey Episode 13 And today we're going to go over a bit about the wretched calculator again.

  • This time, Mark's going into the exercise.

  • So And the exercises Mark explains in lecture 57 enhancing the calculator, we implement a launch screen and we implement a clear but because before, if we were to just type in our calculator, we would type in two studios for and there's no way to cleared after that.

  • So we implement both of those in this video, and I'm gonna send us on over to the computer and you'll see how the video speeds up and whatnot.

  • I'm not actually doing it.

  • I've already done it.

  • More voiceover right now, just so you don't get confused.

  • All right, let's get to it.

  • So we're here at the screen.

  • We already have a working calculator.

  • We're just going to implement the launch screen.

  • So what we're gonna do is we're gonna come over here to Rachel calculator, make sure you're in the general tabs.

  • You should be.

  • You're going to scroll down to launch screen, file within at high concept launch images.

  • Choose the watch screen dot storyboard and you'll see over here lost screen that storyboard and you have a blank view controller.

  • Don't get this confused with the main story board.

  • As you can see, we already had that.

  • And Mark provided us with these image files we're gonna use in order to make the launch screen.

  • So we gonna download those and what I'm doing now is dragging on into our assets folder.

  • As you could see, all of them were there one times image, and we're gonna have to create image views on this view controller.

  • First, we're gonna start off with the big background.

  • We're going to set our constraints zero to each side.

  • So it doesn't matter what what screen.

  • It's the one and always stretch across the whole entire screen, and we're gonna go up and select image, and we're going to select the background.

  • We're gonna select the launch background and not aspect fit, but aspect, Phil.

  • So it fills the whole entire thing, and then we're going to create this little thes rock center at the bottom.

  • Same thing image view there the constraints on the left, right and bottom and I realized while doing this are really and I realized after doing all this on you, miss a few restraints, but our constraints.

  • But we'll go over that once.

  • I actually do it in this video.

  • So and I also set a high constraint because I don't want that fluctuating.

  • And we made that launch ground, which are the rocks, and we aspect filled that as well so it could stretch as needed.

  • All this is just image.

  • You another image of you.

  • We're gonna throw the robot on there.

  • This time we're gonna aspect fit.

  • So we just want this to be one size across all screens serve on 1/3 constraints on to keep this image the same with in the same height that crossed all across all screens.

  • We're also going to third constraining there in order to keep it closer to the top.

  • And now we throw in our retro Cal HQ image.

  • Oh, this is the same.

  • You throwing all of the images, you line them up to how you want them, and you throw the constraints in there and make sure you select the correct aspect fit aspect, Phil, whatever you need.

  • And as you can see here, some of the constraints aren't really working.

  • Well, I didn't implement the proper constraints.

  • I need Thio implement horizontally and container constraints too.

  • Everything that I wanted horizontal which is Rancho Couch in the robot now it doesn't look perfect on the iPad, But, I mean, it's as close as you're gonna get with something just that simple.

  • These air, just like the examples that Mark gave us.

  • So I just stuck with what he wanted.

  • Instead of making a little bit bigger on the iPad.

  • I just kept the same size all across the board.

  • And as you can see, here is a lot of screen.

  • We could go back and say we click on the answer.

  • Boom.

  • You saw the launch bay and click there.

  • Oh, quick.

  • And now you're able to use your calculator and that's really it for the long screen.

  • Oh, it's at least for this long screen.

  • You know, there are some wash means where you do animations like uber.

  • If you open that up, the launch screen has animations.

  • With this one so simple, you just we just throw it four images.

  • We made sure the constraints were correct.

  • We tested them on each device of course, you would want to do thorough tests if this was going to market, but for our purpose.

  • We just used the simulators or not.

  • Even the simulators reviewed it An X code and it aligned properly.

  • And we tested in the simulator with this with the iPhone S E.

  • And it works.

  • And that's really all it is to that.

  • Now that we did that, we have to go implement the clear button.

  • This took a little bit longer, so it's gonna take a little bit longer now.

  • But that's okay, because it's a lot more to it, sort of just putting four images on the screen and making sure there are lines.

  • So let's get to that one.

  • So instead of dragging him, an image you were going to do is dragon a button and we're not gonna make it look too pretty.

  • We're just gonna bring it on over here under what we have currently gonna take out the word button and in background, we're going to put in our background image, which is the clear image, the clear button image.

  • Make sure you throw the image in background instead of image, which is located right above background.

  • Because if you put in image, if I remember correctly, it didn't line up inside the actual box properly.

  • You can test it out for yourself, do whatever works for you.

  • But background works for me, so I'm going to stick with that.

  • And with this, I didn't really change with aspect fit aspect, Phil.

  • So I just kept on aspect fit.

  • It seemed to work.

  • We have been apart assistant editor and create an Ivy action for on Clear Press before we did on equal pressed on ad press.

  • And so one this time we're gonna do own clear press.

  • And this first time around, I didn't do it correctly.

  • But we're gonna go through when I did incorrectly, just so you can see.

  • Anyway, it wasn't exactly sure what to do.

  • I didn't know if I need to create another case or finding the created if statement or what exactly I need to Maybe I need to create another far.

  • But I realized soon after that I didn't need to do any of those things.

  • I tried to match the syntax of the other.

  • I be actions by making it dot empty, Just like above.

  • You can see dot Adolf subtract.

  • I connected the ivy action to the actual clear button.

  • And as you can see, I didn't set the constraints properly on my clear button, so you can't really even see it, But I could still click it, and it it doesn't work, so that I was he didn't work.

  • So here I'm setting the constraints of what not?

  • And I'm gonna fast forward a bit to where I'm actually doing this correctly.

  • So I thought I shouldn't need this process operation.

  • After doing a bit of research, I can Just Whenever the but nous pressed, I could just make result zero.

  • But I also need to create or make the Operation zero, and I need to make the running number zero is well, and I didn't declare the proper things.

  • I put imager into a string and I put a string into a manager or something like that.

  • So make sure you always use right things or else that just simply won't work.

  • Before I realized what I don't have tried to change any object to you, I button.

  • But that wasn't the case that there's no one in years.

  • I just changed it back and okay, the string wasn't supposed to be an Aunt Inger.

  • It was supposed to be operational.

  • Empty, as you can see.

  • So all of those air proper syntax still don't have the right constraint on my clear button.

  • But I compress it better in its toes of work because I forgot one thing.

  • But before we get into that, I realized just in that right there is you know, what we set up is left hand value operation, right hand value operation, which is equals which so two plus two equals four.

  • If you just do, plus two equals, it crashes because we didn't throw in anything to counter act that.

  • So back into this, I took out that the operation I soul appear out label dot text equals running number, and that seemed to fit in here.

  • So I added that in tested my app and sure enough, it cleared it all out.

  • However, it didn't clear out the actual operation because I took out what I had in before.

  • So I need to put that back in.

  • Basically, what it was doing was just clearing out the visual.

  • The result.

  • It wasn't doing anything about the current operation, so it was still adding, It's objecting to the previous result.

  • Now, with the current operation being made empty with pressing of the clear button we do.

  • Seven plus five equals 12.

  • We cleared out.

  • We do too.

  • Okay, I crashed it.

  • I think I tested again before I tested.

  • I decide to set my constraints in order to make the clear button not go off screen and make it so big.

  • You just need to make it match with everything else.

  • And now we're really gonna test it.

  • So do five times seven equals 35.

  • Clear that out, and we do seven plus five.

  • Simplest one which should equal eight just like it did.

  • And I crashed it again just to get another example for the video.

  • Honestly.

  • So as we can see, it clears out everything that we wanted to clear out.

  • And that's exactly how you do the clear button.

  • Of course, this calculator isn't perfect.

  • You can really do anything.

  • All you can do is add, subtract, multiply and divide.

  • But that's not really the point.

  • We're not trying to do exponents or print this season anything like that.

  • We're just trying to learn I was development and we learned math logic.

  • We learned how to use values howto use our operators in order to add those values together and get equal.

  • We learned how to connect the U I to our backend czar front into our bag, and we're able to connect that very easily in X Code, Might I add?

  • Of course, there's some flaws, Like if you do divided by two eagles, it crashes instead of just saying error instead of just clearing that out, basically making someone re type it.

  • But what can you ask for?

  • We learned a lot during this retro calculator.

  • All right, so let's see what I have written down in my trusty handy dandy notebook.

  • All right, so everything I wanted to go over, I've already talked about, you know, talking about the left or right hand values about crashing.

  • About, about how you've taken a big part is how you can take how you can write your ivy.

  • Action out creates that little ball.

  • When I said that you can click and drag on two year you I like we did, and that was something that was awesome.

  • Instead of actually dragging from your storyboard into your view controller.

  • You can write your code and then you know you're Ivy Action and then drag that out to your.

  • But I figured you could do something like that because I didn't think there's only one way to do it.

  • But this way is very convenient.

  • Of course, it's easier to just clicking Dragon.

  • It writes out, basically your Ivy action for you.

  • But it's very nice to know you can just go to your code.

  • You can type in just like just like this sample.

  • We already had four of the same.

  • I be action functions.

  • Basically, we just need to create 1/5 1 So I just take that up, framed it off of what I just had.

  • They dragged it to the proper button, and I think that was really, really convenient.

  • So I did.

  • Journey 14 is going to consist of one off two things.

  • So the first being the next exercise, which is exercised auto layout.

  • So basically, I'm pretty sure what auto lay out.

  • What this is supposed to dio is it doesn't matter what device or whether you have a portrait or landscape.

  • The layout adjust to everything so Basically, if you have an iPad it landscape, it looks similar.

  • You know, within reason to having a portrait on an iPhone S E or something like that.

  • I think that's what we're going for here.

  • And I don't know if that's a whole video worthy, but if you want to see that, so let's do this.

  • If you want to see both of those, let's get at least 10 lights on this video.

  • If we don't get at least 10 lights on this video that are probably end of skipping over, exercise all the layout and not throwing it in tow.

  • Idol Journey 14 and I'll just do.

  • I did journey 14 party rock, mansion or if you want to like the video, but you don't want to see auto layout like the video and leave me a comment and be like, Look, I liked it, but I'd rather just move on to party Rock Mansi, instead of seeing you do the do the auto out, which it would be a lot similar to this just kind of, Ah, fast forward and me voicing over it because I don't want to stay here forever, and I know you don't want to stay here forever, just kind of going over every little piece and maybe me trying to figure stuff out up here so we would do it similar to that, it wouldn't be very boring.

  • So to Recap 10 plus life, I would do both.

  • Whether it's one or two videos, I don't know.

  • But it will happen.

  • Otherwise it will just have to be surprised.

  • Theo, it'll be a surprise to me as well.

  • So that concludes this video and until next time, have a going.

What's up, guys?

字幕と単語

ワンタップで英和辞典検索 単語をクリックすると、意味が表示されます

A2 初級

起動画面を備えたレトロな電卓iOSアプリ - iDev Journey #13 (Retro Calculator iOS App with Launch Screen - iDev Journey #13)

  • 5 0
    林宜悉 に公開 2021 年 01 月 14 日
動画の中の単語