30 Days of iOS 12: Learn iOS 12 & Swift App development | DevTechie Interactive | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

30 Days of iOS 12: Learn iOS 12 & Swift App development

teacher avatar DevTechie Interactive, Learn new everyday

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

34 Lessons (8h 36m)
    • 1. Day1

    • 2. Day2

    • 3. Day3

    • 4. Day4

    • 5. Day5

    • 6. Day6

    • 7. Day7

    • 8. Day8

    • 9. Day9

    • 10. Day10

    • 11. Day11

    • 12. Day12

    • 13. Day13

    • 14. Day14

    • 15. Day15

    • 16. Day16

    • 17. Day17

    • 18. Day18

    • 19. Day19

    • 20. Day20

    • 21. Day21

    • 22. Day22 part 1

    • 23. Day22 part2

    • 24. Day22 part 3

    • 25. Day23

    • 26. Day24

    • 27. Day25 Part 1

    • 28. Day25 Part 2

    • 29. Day26

    • 30. Day27

    • 31. Day28

    • 32. Day29

    • 33. Day30 Part 1

    • 34. Day30 Part 2

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

Learn new techniques to build iOS apps for next 30 days + ARKit + Natural Language Processing + Core ML & Vision

Learn iOSĀ 12 and Swift in 30 days. Each day you will learn something new and apply that in a mini projectEach day. Here are few things you will learn:

  • Build an Interface with Labels and Buttons

  • Use functions with buttons

  • Use NSNumberFormatter

  • Unwrapping Optionals

  • Build custom Navigation Bar

  • Use and detect Long Press Gestures

  • Work with multiple actions on one button

  • Write an app in MVC pattern

  • Work with Computed Properties

  • Create a toolbar above the keyboard

  • Set min and max values for Slider

  • Convert Strings to Int / Double and vice versa

  • Handle calculations with formulas written in the Model

  • Enable or disable objects based on if the keyboard is open

  • Get values from the UISlider and convert them to Int for use in the Model

  • Build Custom Table View Controller

  • Work with Nav Bar Buttons

  • Populate Table Rows with local data

  • Work with NSDate and NSDateFormatter

  • Set the current date and time based on the user's iPhone settings

  • Format the date to the user's UTC time

  • Refresh date and time

  • Store data in memory before changing views

  • Send stored data from one view to the other

  • Work with Gestures

  • Create Custom Navigation Bars

  • Customize the way Back Buttons are displayed

  • Auto-launch the Keyboard when the View loads

  • Access the Camera Roll from within the App

  • Create Image Picker Controller

  • Handle a selected image in the Camera Roll

  • Control how the image is displayed to prevent stretching

  • Build a custom Table View Controller

  • Create custom Refresh Control

  • Stop refresh animation when data finishes updating

  • Update the table with refreshed local data

  • Remove data from Data Source

  • Delete data from Table Row

  • Animate the item deletion

  • Handle rearranging Table Rows

  • Enable swipe to delete Table Row

  • Create a Model to interact with View Controllers

  • Add data to the Model

  • Update the Table View when the View loads

  • Dismiss the View from the Keyboard Done key

  • Segue to new Views from a Button

  • and much more

Meet Your Teacher

Teacher Profile Image

DevTechie Interactive

Learn new everyday


Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Day1: Hello. Welcome. And in this video, we are going to be starting our journey for 30 days off Iowa Straw. And, uh, this is the uh huh, the starter project that I have opened. And you're gonna find this inside. The resource is basically just download this project and, uh, just basically open it up and launch. When you launch it up, you're going to see a a plank of, uh uh I mean, you're gonna see a table of you with, like in a whole bunch off, but days populated. But if you click anything other than they want, the APP is basically gonna crash because we haven't created any other projects yet. Um, so basically, like we talked about this seizes about, like, reading many her projects are that are are going to teach you various aspect off. Iris drove as a less surfed. So what we have here as a folder structure writes for the project. So we have main page. This is there are men. So the content that you already see is is written and we have a main storyboard in that story word. We have a navigation controller, ndvi controller, and that is actually the three controllers strike dissed about back in code. And as you can see, it's just a table view, and the view is actually getting days from this model, and we just we just creating a simple model with they count title and color and basically getting days going to that. There's a small, um ah utility that everything in fair you have, like, you know, radius different flat colors. And this is where we're actually extracting, are flat colors and were randomly applying those. Every single time you're on the project, you're going to see a different scheme. I don't like, you know, be fun to see a different color scheme, associate Earth Day One and data and stuff like that. So that's why I did that. And then he have a day with you. Sell. Ah, that's actually this cell that's being represented here. We are not her using a day description label of we haven't used it. But if you see a use for it of, go ahead and and feel free, do actually put in there and start using it. But it's just there for the placeholder. So that is our starter project. We don't have anything else that we just have this day one folder created and this story would is literally empty. So let's first talk about what we're going to be. Ah, doing like, you know, the very first thing that we're going to do. How, when we start our day how moving forward starting tomorrow is Basically we are going to create a new folder Day been dangle mint. So for tomorrow's gonna be day two and then inside day, too. We're going to create story word day to and they do you controller. OK, now, once once we have done that, I would begin to be doing is, um if you remember, if you've used I X code nine the optic bar are under hclibrary used to be located here. Now they have moved it actually up in the button. Um, I found it a little bit annoying, but I found a keyword shortcuts. So if he hold command shift and press l g el is in as a letter, eso if you are again If you press command shift Elke, it's basically gonna open this window and then you can simply, like, search for your ah element any you can actually drag it down, do the screen. OK, so that's how basically you can ikan probably your object. Um, year object. I mean your object on the legal trouble. Okay, So for day one, Ah, what we're going to be doing today is we are going to be creating a simple tap counter. So any tap on a button are we gonna increment a tap count? So let's create a U I for that. Someone again Hit control shift L and Drop will evil. So we're gonna just drop a label from around here and got jeans and properties here. So gonna change font to be custom. Um, and we gonna choose Avenir next to be our fund, and it's need to be a little bit ball pickles, this city heading a really to be a little bit bigger about 20 points. All right, that's good. Less constrained this out. So we wanted to be 10 points from top. We don't want it to be constrained to margin, and, uh, we'll add some constraint and then we'll basically align it horizontally in the contenders connection. Aly center itself. We gotta choose alignment to be center, and we gonna change the text. Do we tap? I think so. Next thing we're gonna do it. I'm gonna launch are typically one more time and we're gonna try another label. And so we're gonna sentry in the center of the screen. Um, again, case the font. And, uh hey, is this one can be about really big. You want 40? Okay. And open you to do is we need to center this horizontally as a left cortical. Well, Shin also need to actually centered evil it. Okay, so this is going to be our increment, Basically where we're gonna show our counting, right? So let's send it to the euro. Now. We need a button so we can actually tap on. It s o, you know, such for button. And, uh, then you can actually constrained this button to be eight points from the top, Um, at that. And then we're gonna select both of these elements. Okay. And then click on this new alignment strains on basically select horizontally centers. So horizontal centers basically, it's gonna center this one According to the center of this, if any. If at any moment like you move the label, the Putin is going toe. Okay, so that's satisfied Are constrained Any you don't see any red or yellow marking. That means we are good. So what can we do is we can really quickly run this happen and take a look at our progress . Okay? So if he quit on day one, we see our tap counter and basically there's button stuff. Okay, so let's change the button type. Forgot to change it. So you just say stepped up for button. And we also want to change its fund to be helping their next and 18 points to ask it. Okay, so let's go to spend one more time, and then we're gonna go start writing some gold. Okay, so that skid look scared. So let's go back to a re controller. And, uh, we're going to, you know, just removed all the unused code that we're not getting commented once, and then first thing we're going to if you're going to create Noblet now, you might already know this, But outlets are basically waste to reference our controls that we have created inside thes storyboard. So what we're gonna do, it's beginning to say at I b outlet. Um, week, far count count label you want. Now? Um, there is another way to create this. And I'm gonna show you that, like, you know, to create the action. Okay, so let's see, Let's go back to our sold work. First, I want to show you, like how how to bind it, this outlet to your control. So what do you need to do? Basically, is you to select the vehicles older, the top bar, and select this, um, this yellow circle. So it's highlighted, and then go check the Segways and outlets. Basically, this last, our aero one, Basically, where you see sealed all the connections. Okay, so when you click on that, you're gonna notice that your outlet that you just created it's gonna appear there. So this is the one that you created. So you're just gonna take that and they can't leave to be connected to, uh, to this not to the heather. Okay. So that it's going to create a connection. Now, one thing we forgot is we need to create a reset button on that, he said, But basically was, Can do is it's going to show us it's gonna send letters, reset the count. So that's what we're here. Let's create that rock. So command shift l or you can click on that button and we need a button for sure. Here. Hey, we're gonna need this sort of reset. Constrain it 20 points from the trailing, entering four points from the bottom and set really quickly. Let's set this front as well. Said custom happen there next and 15. That's good. I was 16 This get Okay, So, uh, we have created dad lists. Let me show you how to basically create the connection outlets or actions just by dragging droppings. If you click on the assistant editor, the two circles I got, um, when you have your soul board selected, so make sure you have your three words selected in the vehicle drills elected. Let me show you one more time. So So if I have my you control selections, the only thing that have that say it's celery selected. And if I click on this two concentric circles or to like overlapping circles called assistant editor, then it's gonna open the corresponding our we control or file form. Okay, If we doesn't open, you can simply go here on the navigation and say manual, Go to your project inside the project and do the one that you want. And I was gonna basically open that for us. Okay, So once you have done that, what you need to do is make some room s so you can drop your actions in this case. So I'm gonna hold command, control key and then drag from the storyboard and drop it at the bottom section. And if you notice it's already seen that I'm actually dropping it at the bottom section says so That's why it's creating connection as action. But you actually change it to be, like outlet or operate collection. Now, outlet is something that actually just referenced to control action is something where you actually write the functionality to a control and out. The connection is basically a whole bunch of, for example, labels that you want actually reference inside that one label. Okay, so we definitely need action, and we're gonna say it did tap button and time is going to be you. I button that were sent type event should be touched up inside, but there are several other that Eastern actually used that touch up inside is the one that actually were. It makes sure that user actually holds the button and releases it at the same place. So that way, you know, like you know, that's not X gentle tap. It's an actual tap. So just leave it selected their way, and we're gonna click on Connect yet. So that's going to create our the capital while we're here. Let's do same for reset so we can say, uh, did tap reset, take the type to be evident and connect. All right, Now, what we need to do basically, is we need to. First of all, we need to give this hate title. So title is something that appears right here. So you're navigation bars title. It shows like you know where you are on the page and stuff like so that's a really do. So there is a property of few controller call title, and we're gonna just say tap counter, it's And then, um, inside Thea, you did tap, but we simply gonna do a few things, so you need a number for right? Basically, the number for murder is something that we can use to extract number out of a string or convert a string into a number. So let's first create a four matter. So let for matter, number four matter, like so and we're gonna do here is are we gonna say four matter actually here, all right, without allow floats to be false so we don't want any decimal system is going to be simply a integer type And then you say if let ah number from label, it's equal to four matter dot number. So this is how you get a number out of a strength, maybe Say count label that text. The company will that we have actually read it here. So you get that. And if we get a number from the label and yes hey, count Ah, label that text is equal. Do. And, uh, this is there, we can say so we can say its string from, but it's ni san and it's number. So we just simply gonna do Yeah, I think concatenation or stringer literal on which is going to say it gets gonna open. Okay, now, court was intended, which is gonna open double our courts and you're gonna have slash and bracket so you can type are code inside here number from labeled. Okay. That and Bali. And there's an issue. Basically, the issue is we do for some wrap this. Now we know that we can force unwrapped us because we know that count label doc text is always gonna be there. So, uh, the thing is, sometimes when you have your heart left created there, usually their internal properties are define optional and gets there not in h eyes. So for that reason, you have to actually and Rapid. But once you have that valley, you can just give it to, for matter, that number. And, uh, it can actually take that and convert it into number if it can. So gonna take a number, label that inter valley and add one to it. Okay. And that way we have the tap for sheltie. Ready, basically would be doing. If you're extracting number from the label, you're adding one and putting it back inside. So let's check it out. Say, if I clicked, adept and tap dabbed up. Ah, there you are. Number is basically increment now are reset. Button doesn't work yet, so let's make it work. So that the reset button we simply gonna do it. That is currently that text is equal. Yeah, And what you have done that Let's go ahead and build and run. Of course. Um, you know, now this way. Reset. How would be able to do just reset it to zero and start for question? Have you? So, uh, all right. So that's that's it for today and Ah ah, Hope he learned a bit about number four matter. So I would recommend using number four mirror instead off like, you know, doing something like this. Basically, you can do this assault he can do and and you can provide a string. Ah, part of death said, let me show you this real quick. So a tap print ain't and number count. Label that text and you can actually force a round if you run. That's right. Now a and, ah, if you print like you know, when you tap on the button, it's gonna print like you can see you can. You can do that, do that. So perfectly valid. But number former editor is a better approach because it gives you much more hard than just extracting value out so you can actually define the formatting contacts. You can actually get the number from fostering are basically number from a string Our search string from the number and number from a string he can local. I see string. He can define behavior signifying locale, informant a style, The number I informative behaviors and stuff like that. So out Bregman checking this out the documentation out for number for rhetoric and try to use number for motor for you number conversion needs. So that's it for today. I hope you enjoyed this video and I'll see against in next video. Thank you. 2. Day2: Hello and welcome back. And in this video, we are going to be working on her debut project s. So I have a day to already created an open. And what we're gonna be doing, basically, is we are going to be, ah, creating this tap and hold gestures. We gonna learn about gestures. Ah, a little bit serving in the years to off them and start a project. And for this demos, well, we're gonna just work with a simple, um counter, so ah, because I want to show you, like, you know, how the Chester recognize er's work. Ah, and that's actually the best way to keep, like, you know, the you. I had the minimum end s so we can focus on the functionality. Okay, so let's get started. I'm gonna, uh I have, um, basically created They do, Um, and basically, you have your place is for a quick You have this. Ah ah. Few controller and day to storyboard. Now, whatever you create a new story board, just make sure I don't think that I want actually remind you. Is that how when you go to the main page, the view controller actually looks for initial you control us. It looks inside the u I storyboard the name that you have provided basically or we have provided by clicking on the row. And then it looks for initial view controller. Now the way initially, control is defined as you actually need to select here of you can draw this yellow circle and go to Ah, this attributes Inspector Ah, Tab right here and check off. This is any Shelvey controller. Usually when you do when you actually drop eerie control, it looks like this. It doesn't have any air or anything when he actually check this off. It has this arrow indicating that this is initially Now, while you hear how the next thing that I do actually winning whenever I'm done creating the mucus or class is I'll just defined that class here that way. Like, you know, this interface knows what it's how backing have class is going to be. So with that aside, let's launcher Objectivity is so command shift out one more time and I'm gonna drop a label or two labels actually gonna say how these hand I'm gonna hold option key and drag basically to create a copy and before I let go. Option key. I'm gonna let go the drag. So I'm gonna let go my mouth That is going to create a copy if you let go. Option key for us is simply going to move the objects up. That's why we didn't do that. Select both of teeth and first said, it's, ah, fund to be having dinner next and we need regular. And 17 is fine because we're gonna come back them and usually so. But this one, we're going to say it's a medium. Ah, little bit both and about 20 points in. But this one is actually about 40 points big and, uh, center, and this one is censored. So first less constrained. The fun to be, um, 10 points from the top. Inject constraints to mark margin and add that constrain and then basically center it horizontally in the container. And this one is simply going to be center horizontally as less vertically that way. Now, let's, uh, name this one. Tap or not wrap. He can rap if you can. I can't rap. So tap our hold. Um, gesture. That's the passive title. And what we can do here it's out again. Just make this 10 now. Oh, now, once we have this created, we're gonna go to our are re controller class and, uh, gonna create a out so you can't gonna create Noblet like this Be outlet week. War are actually let me show you the other way. Because last time we did the action by dragging dropping, so we should do this on. Okay, so this and and make sure it's automatic. So it's selecting the right one. And then are you simply gonna control and tracked this and drop it here and as because he it's ah diagnosed because we're dropping at the top of the screen is like in Iowa is gonna be an outlet, and we're just going to say counter label, But that's all. Okay, so you have done that, we can we can actually simply close this one right now and go back to our are straight lard . Now, since we have our outlet already created, that is not the only thing that we're gonna have. We're gonna have Ah, a couple of Chester recognizes. So if you open your object library one more time, So so. Command shift l and search for Chester. You're gonna see a whole bunch of Fisher. So you have tapped gesture. You have pinch. You have rotate swipe pan. Ah, screen edge. Not the one that I want. But, um Scott, I was just trying to squirrel Ah, long press. And you can define your own custom gesture. Recognizes, that's all. OK, so what What we need for this project is we need Hatab Tester, So you're gonna just drop it and what he do is basically you drop it on the view that needs to be connected. So in this case, if you click on that, just to recognize er is going to show up at the top are. And if you look at the outlet, the connections are you going to see Jesse recommend is actually bound to the view. So let's take a look at it one more time because we need to add another one so committed Shift L. And this time we need to add a long press just to recognize that I'm going to try drag it and drop it on the double the view right here, or I can actually drag it on the top of this assault. But this. Actually, she just shows you where it's gonna drop so I can drop it on the label. I can drop it on this label, and I can actually excuse me. I can drop it on this for you, so I don't drop it on the view. So let's do that. And we have our long breasts just to recognize er Ready. Okay. So once we have that ready, how are we gonna open the assistant editor one more time? I'm gonna get rid of these comments, but now, hey, and, uh, basically, these assholes, you gotta drag, huh? From, Ah, here, consumable track and drop it here. That's how you create in action. And our center is going to be a tap gesture recognized. So we're gonna just name this Did tap on screams because the user is stepping on the screen . How? Right here. And then we can actually take the long press and going to do the same thing. So So basically gonna say control drag. And this is going to be dead long press screen. I'm really did like, you know, usually it's actually selected as any seeking actually just named this to be you. I long press gesture. Recognize? Er ah, in order to, you know, identify it properly if you need to use that object. Okay, so that's closing its estimator. Go to that. You I, um the view controller. And they said, every gun, I start writing our coat. So first thing we're gonna do is we're gonna create a number four matter. So number four matter is the number for matter, and then we are simply going to say number number four, matter doubt allow floats is equal to false, and, uh, self dark title is equal to gesture. Counter Just tap counter se. Yeah. Okay, now on the tap screen. Ah, up. I mean method, we're gonna actually convert or increment our counter. Now, uh, you could write our code here, but I'm going to be a good develop, so you don't want to, like, you know, repeater code. So for that reason, or it's gonna create a function, you call this function increment counter. And, uh, because they, uh if if if that number a sequel to number for matter dot number from strength and that is counter Lee will not text. And if that is something that we can get to. Then we're gonna say counter labeled text is equal to not that wise. What I intended to do, it should be devil quotes and backlash record and U S a number that we got that in valley. So the number that you always get from the number four meter is, ah, form and this number Now, that number are you can actually from from that Emma's number, you can get decimal value double while you float value in 16. 30. Do our regular aimed or string. Basically, they can get like in a lot of things. From this we would be owned a are we want in value. So get in value and you wanna add one to this. Was there a gun that we simply need to call that here? Okay. And let's go ahead and build and run. Okay, so we have our day, too. So let's click on that, and I'm first gonna tap on the screen. So as you can see, I'm backing up tapping oh, much of places and the culture is implementing. Not if I tap and hold. It's gonna starting grunting really fast, depending upon how could the holders. So if I let go the pressure a little bit. It actually kinda like cells down if I oppresses really hard, basically increments it. Okay, so So the other property that you do, um, that he can set for the long press special. Recognize? Er is basically allow movement. So basically, if your fingers can be moved, that's something that you two, actually, um, if you're not, allow minyan pressure duration. This is basically the time that um huh that the Japanese to wait or the district nizer needs to wait before kicking it. Okay. And ah, a number of top requires is basically a ah, basically number off taps require before the gesture can be recognized. Sort of s and number of touches whether you want, like, you know, to provide this test her own one finger touch to finger dice, three finger touch and stuff like that. So that's all this is for. Okay, so that's long press. And if you look at ah, tap pressure. Ah, the number of property. Just, uh I tend to like, you know, shrinking to just do a number of steps required. So in order to identify one tap, you can actually say Hey, when user taps double or 22 times, then recognize it as who want app, and you can actually provide that kind of change, that kind of behavior. So I mean, it's not ideal, but But it's up to you to do What do you want to do? Uh, for based upon you need and then also number, which is required so you can actually have ah use their touch from two fingers instead of one. If you're like, you know, looking for some kind of validation where it's not about it's actually a human touching it like, you know, testing the control or, like, you know, making a change and stuff like that. You can you can apply these sort of like techniques, that's all. Okay, so that wraps up her the ah day to um and ah, hoping I enjoyed this and and learned a bit about just to recognize Er's. I would definitely recommend he's checking out the documentation and I'll Ha see you guys in next video. Thank you 3. Day3: Hello and welcome back to day three. And in this video, we are going to be building a so far. Ah, slider. So basically, our project is going to be Where are we gonna have slight. So for the day tree, Um, we're gonna create a slider, and Eddie moved their slider. It's basically gonna change offer value for the associative label. So All right, so let's get started. I have a plank storyboard and the re controller created inside a day three folder. So what I'm gonna do is I'm gonna go to its report and gonna press command shift L to open the uptick library and, uh, type you could shoulder and right about to be controller Here. Um, now the district control. We're gonna just type class as Day three, you controller, and make sure that to city in Nischelle you controller in our storyboard. And let's try to run this and they're basically select our day three and fevers being loaded. So that's awesome. Is being a spring loaded. That means our our control is configured correctly. Um, now, let's go back to stroke board and hug in Harper's command shift. L hinder Slider label first So just drop label seven in the middle of the screen. And, um, because status constrained to be like, you know, horizontal and vertical. And then for how, But the horizontal are for the political axis. We're gonna start to constrain to be negative. 50. So that means that's not the one that we won't. Because this is actually horizontal. This'd vertical, and we need to actually move it up it up, like so. So 100 is too much a b 50. Okay, so it's off centered, so we can actually put our other view other control, right, and delete it. Okay, So before we actually put that one, Alice, that this one's properties So we're gonna set the fund to be custom I haven't hear next regular and maybe about 30 bodies. Very. And we're gonna say ALPA slight second. So that's our label. And, uh, what's again this press command shift ill. And you're gonna search for slider and grow up the slaver right here of central to screen and constrain it. 10 points from top and, uh, about 30 points from pregnant and 30 point for leading and trailing 33 points that we come . All right, so by default her the Slater Thanksgiving basically has value 0 to 1. So we're going to keep that because that works perfectly for our case, Harthi over value. Uh, which is? Actually, the transparency ranges from 0 to 1 as well. So because they use the value off slider to set the Alfa property for the for this sir label. So that's what that something. And they used this slider for Okay, so, uh, let's go. And, um, in the view controller possible this move all this junk code that's being common that there's no use of us. Um, okay, now just create a hotly scared in our clip at I B outlet week who are label you. Why label unwrap and, uh is simply going to say self dot Label that Alfa if you go to your 0.5, OK, so initial value is zero point pipe, and then have you gonna create I reaction. So it's self control dragging and dropping. We're gonna create our own working here, and we're gonna then connect it like we connected basically the outlets on the story yourself. It just can't say reaction. Funk did change slider. Well, you and, uh could it be center? You I slaver like, sir, her self taught label that how far is equal to t t float center Dr Value. Okay, so let's go back to our three board and selector. You controller, go to the outlets and such for label for. So we connect label and here in the receiving actions. This is there. You're gonna see your reaction created. So they changed life Valley. You have that right here, Dragon. Drop that on. Hey, it's a really change. You can select that one. So when I would value changes, it's gonna be afford it. Um, Pat it speared. Oh, listen on error. It was just compiler being stupid. Um, okay, so that actually looks good. Let's run the app and take a look. Day three. And as the slider slider he noticed the alpha value is being set. Hi. Wanting Forgot to be sure. Neymar um you control It's all. So we're gonna say off Stater That was gonna happen. A nice title showing up at the center of this grid at the top. Then you shouldn't controller jealous shortages. So office later, there we go. Let's make sure all the other sad OK? Yeah. So cool. So that's it for street journal. See you guys in the next video. Thank you 4. Day4: Hello and welcome back. And in this video, we are going to be creating a tip calculator. So basically, we're gonna design the capital from scratch, so let's get started. So let's create a new group. Let's call it a day four. I think so. Create any file destroy board for it. A view controller date for thanks. So cracked. Make sure. So they correct this. Okay, So what's he gonna do is we're gonna drop a You told her on our screen, and I said this properties day for the controller and any kill you can draw. Here we go. So let's start designing the you I first home. So once again, command shift out, going shipped out, and I'm gonna need only Well, let's drop a label. Uh, somebody around here and, uh let's go Strained this. So 20 points from the top and, uh, can actually horizontal is interact and, uh, genius properties to be, I assume however there next toy appliance. I think medium is good. Okay. And basically there to say this is he tip calculator. Right? So I feel like it's s via more bigger, and it doesn't need to be medium Kambli regulator Also, the car needs to be color in the street. Dark Ray. There we go. That's awesome. So next thing we need is ah ah, an entry point. Basically a place where we can enter our amount of the total amount on which bigger if you're gonna calculate the step serving in that select for you. I text field. Hey, go drop it somewhere right here. Yeah. So this sets of properties here plus two fellow. He's to be 10 points from the top. He's to be 30 points from each sites, so leading and trailing 30 points and you're gonna need a height. Um, so I'm gonna set height to be 70. Hi there. So that actually looks scared. Now what? We're gonna do this figure select part of style to be this non? None. Basically nobody, no borders. And gonna set the placeholder text to be tear it up tear with zero in the center. It it has changes. Fund to be, have a Nair next, and, um, maybe may make it a little bit big. All right, that looks good. Okay, so that is our place. Where we gonna enter the amount? Um, you're gonna need a segment controller. So segment control and this segment control is we're going to show the amount the percentage percentage, basically, So we're gonna need four segments, Okay? And let's first constraint. So we need 10 points from the top, buster Fall then And we gonna use our relative constraints basically going to subject these two elements. So our text for you in the segment control and basically markets leading edge and trailing edges to be at the same place that was gonna basically always match whatever the text to you is. Okay, so next thing, we're gonna change these segments to be called 10%. 2nd 1 is 20%. 3rd 1 is, um sorry. Uh, Karen is 18% and 2nd 1 is not 20%. It's actually 15%. So you're talking about dip, so tip amount. So 20%. And I need to fix the other one to be not in percent percent side. There you go. So 10 15 18 20. Okay. We're also gonna put gonna provide our user ability to select their custom. Keep him out. So off topic in a track and drop dragon dropped. It's a slightly controller in the state of controller is gonna be 10 points from the top, and we're gonna follow the same thing because, like, segment to control. And we're gonna ready to replace this one to save leaving in training edges. Least be He's to match whatever it is right there. And I feel like it's a little bit closer to each other's. Ah, top space. Let's make it 20. Um, for same thing for here is make top space to be 20 and second was here face to reach money . There you go. Okay, so that looks better. Now, we need a couple of labels, so a label actually afford levels. Drop this on, and I'm gonna just set its property first. So it I have to repeat herself. Hi. So set the font 20. It's good. So I take this and, uh, basically, hold option key and, uh, make four copies, like so Okay, right. So what we have done that we can actually place this? He's right here. Okay, so this is gonna be tip amount. It's gonna be total amount. And this is just gonna be dollars, dear. Don't CEO and, uh, dollars. You're not okay. So what we're gonna do is we're gonna first constrained this fun. So again, this one is a little bit for the rights of 30 points from the top. And, uh, but 130 points from leading position, And, uh, then this one is going to be relative. Do the other ones are frustrated us that just stop to be 20 and then we're gonna select piece do labels. Henry going to say they're leading edges or the trailing edge is needs to be a line. Okay, that way, it actually always has trailing edge aligned. Now you're gonna want to get into it. That's one. Is are we gonna say these two needs do align on there, stop hedges, Okay. And this needs to be, um, from its failing. So these are all the constraints, but that one and up, But this one, you're going to say just a line. The, um, the lead trailing basically parties, too, And, uh, been this on has 20 points from the top, but straight, There we go. So that looks scared. Let's run it and take a look. Okay. So day four, and, uh, that looks really good. So Okay, so we could do next. Is so they are going to, um, create a tip model. However, gonna do our calculations screened in the file and are actually really even if I can create a class right underneath here at the bottom so we can just create a class here class tip model. I really you need to you. I mean, if you want, you can create, like, a class in a separate file, but just for simplicity. So, like, you know, we have everything showing up on the same page I'm gonna actually create right here. So this class is Corbyn gonna be called a tip model, and we're gonna have to, uh, variables here mean amount. It's going to have double type, and, uh, then we can have tip percentage. I escaped up double type of song and they function calculate, tip amount. And, uh, basically, this is going to return a, uh, people. So, people, it's gonna be tape amount off type double and a total amount off type double. Yeah, and, uh, we simply gonna check first. How are we gonna stay guard? Let main amount to be made amount and that tip percent to be a dip. Our stan teach house return. Here's you know, kids, you know, like so And then we're gonna basically to a conclusion and return that. So it's simply how the tip amount is main amount times tape percent. Okay. And the total amount is main amount times tip percent, plus main amount. Yes. And I mean, this is for simplicity at Unless we could have, like, you know, wrapped it and this in a variable and this in available and return that so we could done that soft. Um, yeah, that's ah, that's our model s and said Let's go back to our main be control class and we're gonna create few outlets. Just cervical, Say, yet I be outlet week are I mean, amount the old You are a text field. I've Yoplait Week, far tip amount label who are label total amount Label to be. You are able like so. Okay, have we need a couple of very well sets off, so we need a number for writers. So I guess a number. Um, they needs to be I p outlets, not I reactions. Okay. Number four matter, Uh, and we're just gonna initialize number for murder right here. And we're gonna also gonna re initialize our tip model. So tip model like so? Yeah. Nine. Beautiful load. What we need basically is first of all, we need to set number four metres format currency Former so number four matter dot currency symbol. So we can start that to be a dollar or any other simple that you want to actually said it too. And then we're gonna say number forward, but allow floats to be true. So you see floats. Okay. And then basically, how we need dudes that a gesture Recognize er and the temperature recognize er is just to dismiss the keyboard control. So we're gonna say at step just so we're gonna say let Pap gesture is equal to do I tap just to recognize er target itself in selector. It's something that we're going to create first. So we're gonna say at autopsy, Funk did tap on screen and the scorer sender. You're right up just to recognize er is the center because they herself, Doctor, that and editing forcefully bistro. And that is going to be a selector that's going to be basically dismissing the keyboard from the screen did tap. Yeah. There you go. Okay. Oh, next thing we need is, uh and you add the step just recognized do view. So they add gesture, Recognize her hand gesture. Except Okay. Now we need ah few functions. So let's create a couple of I p outlets. I ve excellence. I've reaction. Funk did change segment, and this is our segment Control changes and say, center is you are segment control and basically going to say let number or if let number is equal to number four matter dot are the number for murder, But we have created number four matter number from main amount field that test. So we're going to extract the number of the text field. We just a tip our model. That main amount is equal to be number that we have extracted number. If I spells correctly, number that double value so we can supply double value here and tip Ah, model. That percentage is equal to segment control. So basically the same with the one thing that you're gonna find out about seven control, it's seven. Control has thes index. It's and uh uh, the way you can actually get the value selected is basically by selected segment index. Now that that gives you the indexes. But you need to know, like, you know what it's represented at that index. So we know, like, you know, it's your index p up 10% from the n percent, 18% or 20% so we can create a mapper function first. So it's creating mapper function. Um, and that wrapper function is going to be bunk segment do tip percent. And we're gonna say index is supplied and it returns a double value. Okay. And this is basically which is gonna put this rich statement for Index. You say you in cases zero. Ah, that means we're talking about this first index Pacifica return. Ah, 0.10 Um, And for the default gets weaken the savior 0.18 and then we're gonna add a few more cases were going to say Case one returned your 10.18 case to return 0.0 point 18 year and 0.15 here. So 15%. 18%. In that case, three is que 2.2 Well, starting point. There you go. Okay, So that made happy. Everyone is returning something now you can do here is we're gonna use that function. So we're gonna say it's you know, that you can say segment to tip and the, uh, the index that we're gonna actually refer to this center selected and extender dot selected segment index. That's going to give us the the number. Basically, the index back in the index is gonna be basically give us the percentage back. Let's create another function. Are basically where every gonna computer depth So there's a funk set tips, Do you? I and, uh, using me as a tip amount are basically it's gonna have double. So tip temple are people. They are whatever you wanna call if 50 full. Um, and basically, uh, can have It's just people. So they have dip amount double total, total amount double, that's all. Sorry. Double. And Yunus said it. So self dot tip amount label. That text is he called and we just got his drink and kind of that time and again. The strength or might it? So So I guess a string that in it format okay, uh need yeah. Format. Stick this out. Get it. Feels like not finding the function. So you're just gonna do this first you say in it format. And the former it is going to be exports are are complete because I just want to show you, like, you know, there's, ah, there's a function format in it with format, so Yeah, there we go. Right here. So this is where you can actually put the formatting so we can say Doug Wilder percent Gino point to f. So, basically what 0.2 f means is is take two decimals after the fraction and this going with all value and, um, percent zero is basically the year the index of the argument that in a supply so tip amount keep people, um, don't dip remote. Okay, so that is what's gonna be It's not. And we simply, um yeah, it's simply gonna leave that like that. So it's going to create a string of automated string. It's just a self that total amount level, that text, if you could do something quite similar. So we're gonna copy that and paste it in here, and the someone has changed it to be a total amount, like so. Okay, so that is our tip function. So we're just gonna set that here? We can say set set tips. Do you? I and, uh, we simply gonna call our tip model Don't Catholic ammand That also returns. A pupil said that people is gonna get supplied here and then begin and basically just simply said those Okay, so let's run it one more time and see if well, we haven't connect. We haven't connected. Are point endpoints are my reactions and operative that So as connect those just so main amount field, it's this one tip amount label is this one and total amount level. It's just fun and us segment change. It's this one so badly change. Okay, I found it. And take a look so they for and it be enter. You have changed. It's evolved. Basically pull up a number keyboard, but, uh, said it do 10% 10% is 5.86 and the old total amount is 64.46 And if you tap on the view, her keyboard is dismissed. So let's correct this first. So select your of you can Thea you I text field and ah, go to the property inspector and changed the cube or type to be decimal bad. Okay, that's gonna give us a decimal band is the less add remaining functions at I b action funk , um, did enter amount and center is basically you ice later. So did change him out. How did change? Well, did change slider value. How that, you know, like it's ah, the slider that is changing. And this time we're gonna gonna do pretty much same thing. So I mean, copy this, and, uh, basically, we're not gonna do death for you're gonna do double center dot value. Like so. Okay. And, uh, far that last function gonna say did enter amount. So basically, this time when you actually finished entering the amount we can we can compute the year percent age, so function did enter amount. So s. And if you finished entering amount, Andy, actually, year, um, become our your field, become out of focus. Then, um, you get the dip couple of it. So we're simply not gonna need the stool. You're gonna be definitely gonna need this one, but, uh, this so that is basically going to say number said the number. And instead of the coupled amount, it's less connected. Um, and, uh, we'll take a look. What's going on. It's a slighter and really changed and, uh, did enter basically meditate. Everything didn't. Let's take a look and you can understand basically what's going on. So first function it's basically calling on. So let's take a look at the 1st 2nd function first. How that's where we're entering the amount. So we're gonna enter, let's say, 50 dot 25 okay. And estimates be tapped outside. Um, they should basically 00 the tip is not selected, actually. So and David is not selected. It's probably not gonna help lit it. So tip model should give some default valleys to her percentage. So in this case can actually table hits opting into, um, I be out like a week, but we know that our segment is gonna have some value Holiday. Right. So, um, you can say segment control. You are a segment control. Okay. And for a tip amount going to simply say, 2% take started. Tip model. That persistent percentage. It's equal to segment 2%. And, uh ah, segment control that selected next. That way. Um, whatever selected index before the segment is gonna get that Well, you show up. OK, so I say we do? $50. 50 Henry Tap. And we haven't her. Okay, so what's the RST shoelace? That's type P o. Must you park this, um, segment Control that selected signature. Next. Um oh, Khost. We actually forgot to connect it. So Segment control is connected to this one right here. And I should fix the issue. So are we. Controller did not know what segment control is until because. So that was unwrapping to be a mill. That is, I was selling at 50 0.50. And if he both the way you are like, you know, like anywhere in the few it companies. Thea tip amount. We can actually select different rallies here. We can also change valleys according to our sliders need. So that is actually, you know what? There's on one last thing. The the amount is it's not being reported correctly. So So what? I don't see Oh, yeah, No. Yes, it has that. Okay, so I was just wondering that. Okay, so I think that is it for this video. Actually not know what I was thinking? We don't have the label title, so sound start title is equal. Do tip cow kill later thanks so high that should actually make it complete. And, uh, that is basically going to be the end off our would you? So Yeah. So I hope you guys enjoyed the studio and I was together. Next. Thank you. 5. Day5: alone. Welcome to day Five in this again today How we are going to be learning how to create a y table view. So let's get started, Phil. I'm gonna track and drop he the controller. Discreet best ball. I just have, like, created this storyboard and you control profile. Um, critically. So we're gonna drop 80 control and, uh, that it's class to be day five, controller. And make sure it is in the shell. You control, Are you controller on the screen? And, uh, then we're gonna search for table of you. Drop that Hillary on the screen and up in it dio fewer points. All sites that was gonna take full screen and then in a prudential. So basically, perpetual is a cell that's actually going to repeat itself. Eso Ah, this is where you can. Actually, what he can do is like, you know, he can create three different types of hurt ourselves and depending upon some some condition, for example, you say you wanna show a different cell for even number in different cell for our numbers, then you can actually use two different types else and based upon like, you know, the even non he can actually show those, um, those cells. So that's what it's like. The name suggests it's actually just a prototype. So basically, what you create here is just a template. And then he actually populate that template using your gold. So one of the thing, actually, that is needed to identify with what kind of cell it is. Eyes. There's an identify in the, uh, at root inspector that you need to set. So we're gonna set this one to be cell, and we're going to select our stance basic. Okay. And, um, for our next for you. Randy has basically changed the fund to be, um, there next. And, uh, yeah, that should be good. Okay, so that is our Dave you design. So let's head back to our of you controller and, uh, basically, start writing some code to connect. So trusting we're gonna do is we're gonna create, not lit, So I'll be out. We are people. You You are a table for you. Um and ah, you dont will be Comes with two delegates. Eso those two delegates are our data source and table. You telling it on well, basically what they tell you it's like, you know, whenever you want to influence the table view, you need to actually, um you need to implement our inherit from the studio. Delegates see, Can provide some basic Porsche. Lt's So let's take a look. Um, what those functions are So you are a table of you telling it and you're right. It will. You dance moves. So basically, if we go inside the definition of these, for example, for delegate what he can do is he can actually observe when the cell, when that they will view will be displayed. And you can take some actions on that or when the hair is shown when the fortress showed even when it's like, you know, and displaying its not displaying anymore or said hide for raw at index path. So you understand a certain height for thyroid and expat that he can use dysfunction off delegates. So all you need to do is basically implement difficult reality bodies. And this delegate provides TVX signature for that. So, for example, two of the required ones are number off rules. That's actually part off. They will be tera source tell yet. So our, uh, esos particle number for what's and, uh, basically, uh, this justice cellphone void and expert. Now, if you notice the's do don't have optional like others, that means that these two are required how to be implemented. So these are like the bare minimum requirement for you to have a tail controller. So that's what we didn't We didn't say it return, um, about maybe 10 roads. So these are number of rules, and, uh then next one is cell for Reuters expat. And this is the place where we actually where you actually populate the placeholder cell on the temple itself. So what he do is you actually use stay with you dot de que who usable south. And, uh, there was a reason why we use D. Q. And the reason is, your table you at one point can show only certain number of records. Now, um, ideally, your table if you can be off 10,000 records. But at one point, a user will only be able to see, like, you know, five records for a couple. Now, it doesn't make sense for you to any flies 10,000 rows or 10,000 per type cells just for show five records, so what their readers it actually provides to this dick. You re usable cell function where it appears a pool of So, for example, if you can see five on the screen than it's gonna create, ah, pull off 10 10 cells. So at any point there's only gonna be, for example, 10 rows, any slice in the memory. And whenever the role goes out of the screen so, like, you know, let's the user scrolling and users at 66 to row, that means fast. Roy's not showing that. Actually, that rule is going to go end up in a pool. So next time when you load the seventh row, it might be your first rule that was recycled used, so that actually gives in an inefficiency point. Basically, it makes our table view much more efficient and memory basically memory efficient and memory proof. A memory leak proof because, um, you don't end up creating 10,000 roads for the table of you where you don't need really 10,000 is because you're not gonna see all the 10,000 roast at the same time. So this is an optimization that actually Apple has provided for you and Ali it to do is basically just say you reasonable sell and provide the identifier that you want de que it for So next thing we could do is we're gonna set the text, Lee, will I in Texas to be And we just simply gonna type Here we go. Number number. And, um, it applied Index bath. Dr. Row. And this is how you know which roll your at their next batter for whites. You, when it's rates from from, like, raise different attributes. But it also provides you the role. What? The number of roe Ah, like you know, you're it and throw. So, for example, if you're a sex throw cell is gonna be us five, because it 00 based index So it's gonna have, like, five horses in there. So you know, you're gonna see what footprints eso. But in order for this to work, we need to actually make our view controller to be like no delegates, and they're sore. So it's a because itself that they will be done delicate if you could do so and self thought they will. We don't that resources critical to yourself as well. Okay, does not forget Teoh connect her table view to her straight ward. Here you go. And if you run it right, right now, we're gonna see a They will be on day five, and they would go, you know, want to do far. All right, So that's that's about the basic fuel. And that's it for today. I'll, uh, see you guys next time. Thank you. 6. Day6: Hello and welcome back. And we are today. We're going to start with day six. So there's where we left at day five of and we created this Ah, table be controller and basically are displayed that so once you forgot and before actually go to day sex one actually provide a label And do you basically will you? It's ah, title that set, not label like tight 11 to say eso does Go ahead and run this Ah, let it building Show up here. Ah, let's let him so But what we don't do today So today we are going to be basically learning about ah date format. So we're gonna basically put a date control or basically a label and a button, and we can show basically, when you click on the button show current date and we cannot also talk about how to set the format the date. Okay, so let's get started. So And if you noticed heart changes actually now in place, so that's actually good. So I've already created day six holder right here, collapse everything else down. Great. So this holiday sick says nothing is just an empty history word an empty you control its tendered bugle drawer. So I'm gonna have basically just go ahead and press command shift. L um and, uh, then open you controller. Drop that right here. Okay. And, uh, let's Ah, let's learn in new control. So basically a, uh So if you remember last time when we laid out our controls what we did basically, he, uh, took for example, label. Uh, if it wants to be selected. Well, that that was bad. I should just replace I hit, enter and replaced view with the label, That's what What's going on? Would you want to do that? So let's drag it and drop it here. So imagine like you had three different labels. Um, I'm just gonna army before, so I'm just gonna option and copy and option drag to make a copy of these. So I imagine if he had these. Now, if you're basically sort of show them at the center of the screen right underneath each other, what would you do? So in earlier case what you can do? Is he gonna basically set the first labels? Ali out and ah, then was he affected? First literally out. You're gonna make all the others were relative to that. Okay, So if you want all of them to be, like, you know, stacked around the center, what can I have to do is firstly well, he gonna offset it. What? They were this other two needed. Ah, dissenter. So to sort of talk about. So let's stay if you are basically apply horizontally unlucky like that. And now you Ah, depending upon what the height, it's sort or anyone you know, offset about. Ah, 42 plus 10 32 for example. So let's outfit negative. 52 se. That's not one I need. Why Access nectar 52. Okay, now, the next one. Listen, drag it down, so there's a lot less speed. Okay, so next one, we're gonna actually, uh, sort of put it here, and, uh, just in a eight point from the top, constrain it in. How is absolutely good of you, The same thing here. Basically eight point eight points from the top and, uh, on the same thing. Okay, so, uh, that's Kit That actually makes our label sick that they sentence a screen, but ah, you saw how much work was it like, You know, there was a lot of thinking. I had to offset this about for your points. 52 points. I can actually accommodate all these other city, actually look sort of looking center. But all the thing can result very, very easily. So let me show you a new control that's called Stack you for me. Just undo everything. Okay, so let's say if I option copy these two. All right? So now you have these four. What happens is basically aimed. There's a new control called stack, so you have to kind of fact views. You have horizontal style and you have a how cortical stack you so it and it shows in the image. Vertical sack views tax item on the top of each other and hearts unwto the side of each other. And and the benefit of Sacranie is like, you know, you can add elements inside it. And the stack view is a non visual control, so it does not have its own appearance. It does not have it on you. I buy seconds role she cannot provide, like, you know, stack you that background color. And you can't just go with that. No, it's strictly a layout control so he actually put your elements together inside it, and then he just kind of constrained that stack of you rather than contrary, constraining individual elements. So the credibility of pro right says, like has its own states and tax the managers like, you know, spacing between them. How do you want to distribute like this pacing and everything? So that's what this stuff and X code has. This tool that can actually make, uh, these labels are wrapped into a stack of user. If I select all the stack fees, if I click on this button right here and bet in and if I say skull a stack of you, yeah, it's basically gonna know looking at all the labels because they're like, you know, work, Lee Ah, looking it. Think it's gonna create a work tickle stack for me. It's know what he can do is you can select the stuff you stack of you, and you can take a look. It's property so he can change us access to be like horizontal. So actually, it distributes horizontally and, uh, let me first, actually, considering this so we can, um you take a look at a little bit better. Okay, so you can you can stack them or something and you can stack them or tickly like So, honey head, you can find the alignment. So, um, so they all can be, like, you know, leading. So if it's a stack, if it's a basic view that's actually going and it is to head all the elements over the start from the leading edge, okay? Or you can say fill. The industry is basically stretched the element to fill the entire, but like in alignment, space distribution, how you want to redistribute it. So if you want to distribute them, felafel equally feel proportionally equal spacing equal centering. In this case, you're not going to see much difference. But if you have different kinds of controls that you can feel so you can actually tried out like, you know, in a real example, I just want to give you, like, you know, Andrew about 2nd 1st felicitous to fill equally spacing is something interesting. So spacing is basically what Thomas spacing do you want between elements. So if I say I don't want any spacing, they're gonna be bodied each other like that. And if I say owner is based off 10. It's basically gonna create his face. Often. It's gonna maintain that space. Okay. Um, so, uh, let's say like, you know, if you said it back on color, anything. It No, this. You know, this There's just no effect whatsoever that happens on this because it's not a visual control its destiny. I lay out control, right? So I hope that makes sense. So let's proceed with our dates. Ah, project any product. So we gonna drag a label bust? Have you gonna give this label current a two hand time? Takes two. And time is we spelled correctly going spell correctly. What? Ah, brought cases. Case is wrong. So the students found to be how would mayor next? Okay, and next thing we're gonna do is we are going to, uh, drag another little, which is gonna be a placeholder fair weaken a short time. So glad you label. And, uh, this label part is going to be a little bit bigger. Also set dia I said the font to be evident. Next. Make it regular, make it bold and make it really big. About 20 points, 40 parts. Big. Maybe. Um, I think Metallica's okay. I don't want to make it out. Okay. All right. So that's a skid. Um, next, we need a button, So take a button. Sorry. Um, button? Yeah, about that button right here. I'm gonna Ah. First, um, call it fresh genius font and give it a maybe a high control, because I want Spartan to be off certain height. So once we have done that, let's select all these and prices and bad in stack. Okay? So if you noticed we have this, uh, all these elements are now sitting nicely inside this sack of you. So what can we do here? So I went festival. We needed to be. So let's take a look if you do leading this is what happens. So all the elements go to the leading climate. If I do centering and everything becomes center. If I do training that every everything comes straight, everything is like it. The trailer and off the stack of you honestly failed, so it fills the entire space. I also in a picture that these are center aligned. Um next select a stack more or time distribution will equal. I always like, equally felt because they fell a proportionally So it's felt according to their own internal heights equal spacing are he could do equal centering like so hurry. So, Phil proportionately is actually better. And the spacing I want It's about 10 points between them now, the benefit If they served, like knows, constraining all these elements, I can actually constrained this one element. Second to say I wanted to be centrally this centre horizontally and vertically next. Okay, so that's about it for the layout. Just go back to our view controller, and, uh, you're gonna create not let week. Are they timely, will you? I label and, uh, you're also going to create a and you control. Ah, new way will call date for matter intake form. It is something that he can use to format dates. Um, and, uh, it comes with a very different options that we're gonna check out in a moment. Okay, So what we'll do is first in the region load. We're gonna set our date for matter. So date for take for matter got angle. First of all, so we won't are gonna set time zone for date. Former and we can say time zone abbreviation string UTC So our dates needs to be in UTC format, OK? And gets a date for mr dot date format. And, uh, it's something that we can experiment with. But I know this one that works. So oh, I'll actually put this on and, uh, talk about what? These are in a minute and day for my daughter. Got So that's the setting date Thai labeled a text is equal to date for matter. Dr. String from date and gonna get the current current date. But just initializing the date class. Okay, Now, this creator, I be action. I be action did tap have you right? A 10 level that text equal toe date for matter not string. And we're gonna get date. Her single time user presses the button begin actually got the date. And the only thing that's gonna differ is basically the seconds on the screen. So I said, let's connect these. Select the controller. Yes. A, uh, has said the Beatles reversed. So it is going to be day six, you controller, And this STD shall be controller for this for this is to report and next we're gonna set the outlets so time they will be test level and, uh, the DAP refresh is this action step Touch up hit side. All right, so let's run it and take a look. And then we're gonna talk about the format. It makes some changes and talk 1 to 4, right? Okay, it's a day six, and as you can see, his, uh, it's really big, actually. So it's obeyed the phone days that it's actually going off to screen. So that's correct. That, uh, take this in it is to find Fanta. Bet to be about 3 25 points. It is good. Okay. And very well, what time? Okay, so that's good. Now the refresh you notice, the second is something that's in correcting. Right? So that's actually ah, that's actually get because there were shared that controls that are working. All right, now, let's have about four minutes up. This e is actually your presentation off the day. So what can he said? As he can set it to e. And let's try to win this and take a look. What kind of far might get So yet, like, just about sat that means a abbreviation form off the day. Okay. Mm mm. Represents the month. So that is different from a small AM, which is which represents minutes. So you can have making a sharp or you can have. I think if you do four, it does, like, full, full month. Well, except ember spelled out like so. So Saturday, September 22nd. Okay, now, let's say if you do, uh de de is like, you know, date. Why? Why? Why? Zaken do, like four whites or you can do to wise and, uh, that actually will give you. Now, this will give you dates in number. So take a look. 09 turns to 18. And you're much welcome to actually had any kind of format that you wanna add. So I've added, ah, forward slash. And now the date is gonna be shown in Saturday. Um, you know, 9 22 18 And then the time and double is basically for our, uh mm. Is far minutes and SS is for seconds and wrestle things Are your formatting text seeking for murder fit that she could did move them around. We can say, like if you if you if you're in a country where they follow, not I am. Did you buy buy buy, but ah dee Dee. Mm. Why? In that case, seeking extra simply rivers dia Ah, the sequencing. And, uh, and get get that to basically how the brain that that out. Ok, so I'm gonna reward it back to me. I do. Why? Hand me this. Yeah, that's good. Okay, so that is Thea date for matter, How to format dates with different formats off the strength. So I hope you guys on your decision, and I will see guys in next video. Thank you. 7. Day7: Hello and welcome back. And ah, interlaced video. We are going to be looking at passing data from one screen to another. So let's get started. Ah, less open day seven. So I already have a basic set. A pretty I have Ah storyboard created and a view controller created. So let's first define our storyboard for this out with this project were simply in a need 22 controllers. So we can I say, um, not a new file, but command shift L you controller? I think so. And, uh are you gonna do it? Makes a little bit for room and job. You're gonna drag another. You got over, like So there you go. So and just to keep things simple, what I'm gonna do is I'm going to create another of you controller right underneath this class, and this is gonna be called detail the controller. Ok. Ah, this is just Teoh. Keep thinks a bit simple. And now what you do is gonna go back to our be controller, and, uh, we're gonna have text view and this text for you. It's going to be 10 points from all sites. Are you bend temperatures from all sites And could you the same thing here basically gonna ever Thanks for you and, uh, this text for years going to be 10 points from all the sights, like so, Yeah. Now, let's Ah, I suppose changes font to be custom and, uh, having their next and mr same thing for this one custom happen there. Next. Done. Okay, so now we're gonna Basically what we're gonna do is we're gonna create a Segway. Segui is just a connection in navigation connection on navigation direction, a path for us to tell, Like, you know, this is where we wanna go. So it's just a connection from one view controller to another So we can do if you're gonna click on this. Ah, yellow dot And we're gonna control track to another vehicle, troller, and just drop it there. Just leave our most and we're going to select show as, uh, the as the action that we're gonna basically reform. And this this connection right here it shows that the kind is show secret kind of show, and it's basically going from the screen to another. Okay. To the second clean. Right? So let's give these thes agrees. Um, classes for the day. Seven be controller. And ah, this one is Day seven detail, you consoler like so. All right. Now, um, that's gonna be it for this storyboard. So you're gonna head back to our toe Every controller, first thing we're gonna do, it's ah, we're going to give this up how you can told her and identify her. So the secret terror where we're actually navigating. So I'm going to say, Ah, static, Let I, then do you fire? It's equal to days happen. Details like so we're gonna copy this and collect our storyboard. And we're gonna name this Segway. So we're gonna just go to the attribute inspector and going to give it tonight in fire. Here that way. Decide identifier matches what we have defined here, and this is going to give basically us ah, way to know which Segway to trigger. So let's create an outlet. I be Outlet week are thanks to you. Take. You are text you and I'm going to copy that and paste it here. So next thing I need here is a text, um, strain a very well called text off string type. And this is where we can actually supply our data from day seven. View controller. OK, so on beauty load, First, we're gonna send the title. So against itself, that table is equal to, uh, first first view. And, uh then for the 2nd 1 we gonna say title is second view. And then, um, we'll begin. Begin, actually, define a a done ah, button. And this time button is going to basically display. Actually, um, we're gonna Yeah, give me. Leave it. Leave it at that. We're going to use the back button, offer the re control to go back. So, um, I was thinking, actually do put a new button, but that's probably, like, hit topic that we can discuss, you know, But later, another video. So pretty how what we're gonna be continue doing is, um just keep thinks simple. We're gonna say, prepare for Segway. Yeah, And this is where we can actually prepare for a favorite trigger. Now, when? Ah, when you have entered the text out. So when you entered the text, what do you want to do? Basically, you want to show a button out right side of the navigation and say when users stunt click on this 10 buttons so we can actually never get to navigate user to the next screen. So we're going to use navigation part for that. So navigation item dot Right, Barbara, tonight, um, is equal to you. I bar, but an item. Okay. And the type is going to be done. Target is going to be self and selector is going to be a method that we're gonna define here. So we're gonna say at up to see Funk did press done button domestic or sender? You are a bar, but tonight. Okay, so that's electorally gonna select here. Selector did press done, but thanks. So Okay, next thing we're gonna just here. Whenever user presses the done button, we're gonna call this perform Segway message has to find on at the view controlled level. So you're just gonna call this and this identified is the same identify that we have actually given to our sec. Way. All right, so we're gonna go and we're gonna say identified is going to be day seven. View controlled detail, V comptroller dot Identified. So it's gonna be extracting that I didn't fire from there, which is gonna be d seven. Details. Hi. So prepare for Segui method. It's called when Segre is about to start, so this is the opportunity where you can actually supply the information, collect information and supply to the next screen. So that's what we're going to. We're going to say if Segway that identify is equal to Day seven b controller that identifier. So if this is the day seven second, then began to say let BC hurry, controller is equal to Segway, that destination as Day seven be controlled so we can force unwrap this because we know that if they identify it's day seven details, that means it's going to this day. Seven few controller. The reason we won't do that because you can access the property that we have to find the next property. And we're gonna set that three guys say self doubt. Text view dot text is something that we will supply in this table. Yeah, so that's it for that. Um, that's Ah, the controller. Ah, now for the detail, we're going to alert you, simply going to say it's the title right here and you can say, Ah, text we That text is equal to whatever is in the text. Um, and we just gonna find that protect? So with that, if you run cold right now are on a project right now, what you see is, uh, help. So this is actually a good dinner. They said when we control it is not reachable. So we have We didn't make it as an initial. We control our So let's do that. Because otherwise, that program is gonna our products is gonna crash. So let's make it initially controller and run it one more time and I ever got So this is day seven, and if you click on day seven, I said this is nothing we should have actually got rid of that. Should have. Okay, um, so some of this and, uh, pass removed base. OK, it is That's giving you Hey, learning. So Okay, so I three launch their app and take a look. So we're gonna go day seven, and we're gonna enter some text year. Some sample text having assembly click done button. And we have a crash. Of course you have a crash because we haven't connected any of her, um, text for use to view controllers. Socialists like that in connector Ablett. So this one is this one. And, uh, the stakes for you goes right here. Yeah, that's real in the APP, and hopefully this time it is going to work. Well, if it doesn't work, then we gonna find out and debunk the air. So that gives you an opportunity to basically debug something. How you gonna find in real life gets is a kind a lot Sample test here. Hey, we got a press done button, and there we go. So you see how simple desk being passed right here. You can go active first for you. Hey, you clicked on. You can. I said he passed information back. All right, so that's it for Ah, distribute and hope you have enjoyed just radio and I'll see you guys in next year. Thank you. 8. Day8: Hello and welcome back. And into this year, we are going to be looking at a keyboard appearance for text feels so basically, um, we're gonna give our keyboard a dark appearance, and we also going to see how to use Ah, swipe gesture. Recognize er to basically dismissed the keyboard. And last but not the least, we are going to be basically launching Keyboard Essen is you have your you have your view appeared. So basically, whenever the view is shown without user tapping on the under screen, we're gonna show the the keyboard and basically make our text view Has a focus. That way your user can come straight in the start typing and stuff. So s so that's gonna be the topic for today. So let's get started this open day eight. I don't have anything created here right now. It's just an empty, empty storyboard. And the standard set off Ah, view controller that is created for us by ex Good. So I'm gonna allow the comments here and we're gonna do is basically first thing. We're gonna go and create our our storyboard P control over. So what's again? We're gonna have press command shift l and, uh look for the controller ain't gonna drop it right here. And, uh, let's give it day eight. We controller the class and basically make it in the show. You can told her next thing we need in here is a text for U S. If you can actually opened their object library and look for next few, and in this text, we just just gonna drop it right here and constrain it to the basically zero from all sites . So s actually align nicely with the view and covering the entire view up first. Going to change the font to be custom and family to be having their next size is OK, so just gonna click on done, and I'm gonna select the text and do command a do ah, delete all the existing text that we have a year. Okay, so that's about it for for storyboard. And we're gonna go back to the U B control class. And first, we're gonna create a, uh, Buche on outlet. Basically so scared. Not let at i b how weak. Where text view you are a text. You and basically here. Now we're going to start keeping our text for you keyboard and appearance. So if you type text, view that keyboard appearance so you can actually give certain things like, you know, you can choose keyword type and, uh, if you choose keyword type, get like different kind of keyboards. So, for example, in this case, if this is, let's say this is a twitter of absolute keyboard, for example, I so to say, the Web search actually also show the extent Street actually makes us forces. So let's give it Twitter type. I had text view, doctor keyboard appearance. Uh, he can actually give it dark light are alert basically for alerts panel. So in our case, we can actually Jews dark. Usually it is a light type that's a default. So we're going to choose dark. And, uh, now there's one more thing we're gonna do is I see that's on this right now. And, uh, first disconnect. Don't forget to connect our outlet. So text for you. Um, I want to run it right now just to show you what you got so far. But I want to basically come back and launch keyboard on on view. Appear that way. The focus is already on the text text box in his work and just start typing in. So let's select day eight. And if you choose to type, um, if giver doesn't open, he just simply go to hardware and look for keyboard and toggle Softer keyboard. And there we go. We have a dark keyboard, all right here. And we have at symbol and hash symbol, which are pretty common for Twitter. So you can actually you can use this to type your tweets and stuff like that. So, um so that's actually that's a good start. Let's give this for you. A title is also we can say so. Title is equal. Teoh, keep Bore Puras and the Supreme exploring here. So next thing we're gonna do is where estimates user lands on the page and view You did appear we can actually start showing this keeper. So it's simply gonna save You did appear and they're gonna hit, enter, do our to fill and faster we're gonna call Superdawg. You did appear any minute going to supply that any minute really that we have received to the super view and then here, you know, say if ah self taught text for you dot can become first responder. So if it can become first responder, basically that means like, you know, it can. It is a place where when you tap and user taps on the screen, it can actually perform some operation. So it can actually basically trigger that operation. That's what can become, uh, first responder means, But he can actually read it here indicating the eso. It raises clear turns a 1,000,000,000 indicating whether the subject can become the first responder not, And it returns false by default and surpluses much override this matter and returned true to be able to become first responder. Okay, so, um and this is just a recommendation that do not call this method on a view that is not currently being the active in the hierarchy of the result are defined. So basically was trying to say is if the view is not on the display than it should not we should not call this. So that's why he actually check for can become first responder, actually response you if that you can become cross responder that needs simply say ourselves dot text view that become first responder. Okay, so that way our text so you can become basically first responder and user could just come on the paint and start typing. So if you launch the app you're gonna see has two missed app opens up, our rage opens up, we can see And I did not tap on anything else. So Ah, watch. I'm gonna click on day eight and just walk away and it's automatically opening. I can simply if I start typing, I can simply start right here. All right, so that is Thea Keyboard. So now one of the one of the issue is What's the The Keeper appears it doesn't disappear. So how would we make it disappear? Well, we have a couple of justice. We can add a button on the top saying, like, you know, done button. In essence, you quick and done button Ah, the keyboard hives. Or we can choose a keeper type that has go or done or, like search or anything like that, a button here that can also work. But let's say if you're really using this for writing, like you know, something like Twitter, what happens in that case? Well, in that case, you need all these controls and you don't You want to give your user convenience off typing these things like right off. So, um basically, in provide a gesture based approach. So what we could do is you can simply just like you have, like, this swipe from edge gesture to dismiss Avery controller and go back. Or either you can click on this and go back simply if you in our case, if you slide down our keyboard should disappear. So that's what we are looking for. So that's at that functionality. So we're gonna say, swipe gesture. And they were gonna do as you're going to say, Let swipe gesture you. I swipe gesture, recognize er and, uh, the target. It's going to be self. And, uh, this is where we're going to provide a function. So at upsy funk did swipe town center. You I like just You recognize her? I think so. So up this feel this inquests, the hash selector and we're gonna say did so I the sender as add this just recognize er on the extra view. So that way our text for you has the stature head gesture, recognize? Er swipe you just right now. The other thing that we need to provide the slide just to recognize a is which waste for twist direction. Right? So we can say direction. And, uh, we can say, like, you know, the direction that we want to recognize is down. So user dragging from Dr Bottom downwards. So if we if he said that, and here we can check if center dot dot direction it's equal to don't in that case, it simply ask myself that you don't end editing fourth true. Okay, so if you run, hit right now, um go theater. How Khost. Um you don't need that. He can simply do it like that. Okay, this Stop it one more time. Did swipe. Thanks. So missing underscore and score should have been there. All right, so that she was assault. Let's relaunch. And, uh, now, if I select day eight and I have to keep showing up, right, type something. Yanta basically outside down and they go, Your keyword has disappeared. So one more time a typing. And, uh, once you're done typing, just wipe down and your keyboard disappears and you swipe back to go back. Right? So that is it for this video. Hope you guys enjoyed, uh, days video and I'll see you guys next video. Thank you. 9. Day9: Hello and welcome back. And in this video, we are going to be talking about you. I image picker. So basically, today we are going to create a screen that's gonna have text and a bit off image, or basically, the entire image of in the youth. Your image, you. And basically what we're gonna do is we're gonna load image from the photo gallery. He using a miss picker controller. So s so let's get started. Basically first, let's open Day nine. I have again the empty storyboard, and there's literally nothing there. And I have this Wii controller. So, uh, and get your wondering why, if my screen looks different from the last recording, it's basically because I have upgraded Teoh, Mac OS X, Mojave and afterwards, and the dark team, which is why everything is actually kind of dark. So, uh Okay, so let's ah, let's get started. I'm gonna press command shift L to open the object library and we controller, and we got a typical right there. And basically what what we're gonna do is give me how we're gonna drop a label then. So look for people. I'm gonna put it somewhere right here. okay. And let's constrain this. So I want to constrain this but 20 points, some top and Tony from left. 24 right? Like so. And, uh, this is going to be a multi line, so let's go. Do you object, Inspector, are contributed Specter and basically changed lights to zero. Um, and basically, I'm going to just copy a coat real quick from Steve Jobs. And I've been actually based it here. So has based that. And, uh, next thing we're gonna chase the font to be having their next. And I think 17 looks, kid or maybe 16. Okay, perfect. Yeah. This piece give a few spaces, except Ah, yeah, get more is to align it properly. Yeah, that's better. All right, so the next thing we need is a y. You mean to you? You're gonna get this is my major and put it right here and going to constrain this. So about 10 point from top 20 points from left and right and trying points from bottom. There you go. And, uh, once we have that, we're going to select the image of you and go to content mode. Said its content mode to be aspect fit like so and that is about it. So that's actually our entire three board. So this make sure that our of you control it, it's gonna have a class. So day nine, you control her. It's a class, and it is any of the shell you control her. Okay, Once you have done that, we're gonna go to you are day night view controller, And I wouldn't rule all the comments stuff. Let's move this, That's all. And we need is basically we need to reference to our how you I image you. So you're gonna say at I B outlet a week far image byuk you. I image you okay. And basically, what we're gonna do is, uh, you also going to create it in image picker. So you I Miss Baker. That's what we're gonna create. And, uh, basically, the way we're gonna created it, we're gonna lazy bar it, basically gonna create a lazy property. So we're gonna define everything, but it's not gonna be initialized until it's called for the first time. That's what lazy means. It's only initialized once, but it's lazily in the slights that gives us the opportunity to not put too much load on the ab. Ah, while like, you know, initializing this view controller. But when the object becomes, like, you know, is called for use at that time The object er's istan, she added. So that's what lazy means. So, lady of our image picker, you I image picker and told her and, uh, big tonight, right? This let high P is equal to our image. Bigger controller. I peed our delegate, his he wrote itself. I'd be done allow anything is equal to false we don't want Ah, the image that yes, there has selected We don't wanna take, you know, we don't want them to edit it. You can you can allow them to edit it And it's gonna open a standard, um, edit window. Basically for the four Director for the year for your phone. That's what happens. Way select. Allow anything to true? Um, OK, so state it's going to be a photo gallery dot camera. He could give camera so that if you give camera, basically it's gonna launch a camera and you take a picture and your pictures supplied so you can actually try this house. This is actually really cool. Um, we're probably gonna see me. We're probably gonna do it in one of the other, um, videos where we can actually try camera out. But for now, we can actually use for the library. And once they have selected for the level just return, I'd be there we go. So r Mich Picker is initialized now in beauty load, what we're gonna do is we're gonna stay cycle questing display photo sorter that less and no. Okay. And do it. So we are going to create a new button. That button is going to basically the letters launched this image maker view, so Ah, you have created it once in the last video. But let's try to do it again. So, navigation item. That's really neat thought, right button bar item. So make sure you're not choosing items, but you're choosing quite button bar item. The main difference between those two is ah, right button bar item takes, um, you I four Parton item and the other one items takes an array off your partner. Might the study only difference? Ah, that Thea the one that he used years to add. Multiple. Multiple. How? Buttons. So we're gonna we're gonna take it out like, you know, one of the other videos, That's all. So so right now, just choose, huh? Right, Barberton, Item. Okay, so next thing we're gonna select the type to be maybe Head are actually what is the how there's no for two x exception. So let's add a camera so camera don't get itself. And we do need a, uh, function. So you say I don't see the funk, and this is going to be did tap camera button. I'm just call center you I part Britain item. Okay. And basically, this is simply going to present our how I miss Michael Vick. But let's finish just her selector. And this selector is basically going to be our dead tap camera. Put an item. Okay, let's make sure our apprentices are balanced, and that's part for this one. So let's go ahead and present. And basically, we gonna present you controller. And this view controller is going to be image maker, the one that we created right here. Okay. And this error Are we going to resolve this hair in a minute? So just don't worry about it. Any made it is going to truth and completion in? No. Okay, so that's solved The error, basically what it says is cannot assigned the value off delegate day nine. You controller to type. Ah, do type you I which picker controller. And you I navigation control delegate. So these two delegates top because we have not inherited from those are not implemented from those that's ice skating. That there. So let's go to the next station for day nine. We could told her, and here we're gonna do just that. So you're gonna see you. I navigation controller delegate. So you are picker. You are image maker telling it always requires you I navigation control or delegate as well . So next thing is you I him a speaker, control. And then ah, here we can actually implement one of the method that actually is going to provide us the emails that user selected And that that arrest did finish baking media with info. Um, did a striver granted you were speaker delegate. That's way. Okay, so did finished. Yeah, this story so did finish picking media with info. That's the one we need. Okay, So first we will check if we have any image picked. So that's a guard let picked image is equal to info and began actually looking this in for directory in for a basically then for collection to find our image. For Kim. Say you are image baker controller dot in foky that original image, that's what we want are the one that used aspect Um, Ailes, I'll be simply so this is going to be as you I am it Otherwise speaking. Noto, come here. Thanks. So okay. And if you use a has boots something we simply that's a self taught you mean for you, that image is he called picked image. Okay, Now are there are more cases are that we need to handle, Basically, in case you either cancel the picking off the image so they don't want a big any image. So they're just click the cancel button. In that case, we do want actually handle that. It's all so what we want to do. So But we're simply going to say image maker did cancel. And we can say in that case, just simply dismiss animated like so Okay, so once we have done all this are are happy is almost ready to run. How? We just need to find her applet. So we're gonna go to the AHCA inspector and basically kind of dragon up, maybe you to the view so it can make a connection between the storyboard and the controller . And with that run and dick, look it in the action. All right, so this is our day night, So let's select a night it. Ah, this is our label. And this is their images. As you can see, there's nothing showing up here. Now, if you click on this button, it's basically God to launch our photo gallery they got and how we can choose this new photo. Um and, uh, about did you forget to dismiss? Yes. Okay, So you forgot is basically dismissing the B controller when the user has selected the image . So this handle that so dismiss any major true and completion left. Now, what we can do, actually is we can create a function, dismiss you bc, like so and begin. Simply call this once. That way we can have are dismissed logic in one place. And that actually gives us an opportunity. As I say. If we won't do like you. No, but logging or something. When you try to dismiss is we can actually put it right here. So let's go ahead and run it for more time to ah, see if our issue has been corrected. Because what should happen is how and User has selected the image should simply close that he made you. I mean, the speaker. So, like, so again. So that is sorting perfect. If user actually clicked on it and simply click cancels, nothing happens. Her image that Tero set is already set. So All right, so that is it for this video. And thanks again for watching. I'll see you guys in next video. 10. Day10: Hello and welcome back. And today, on day, not date And how we are going to be talking about, um, another, uh, another feature that we can implement for us table use. So what we're gonna do in this one, it's basically we're gonna create the table, you and, ah, when we're gonna actually pull it down basically Ah, ah, it's going to refresh the page. So basically pulled her fresh is the functionality that we're gonna be implement thing in Today's how video. So let's get started. I'm gonna open the date and story, but I've got nothing here right now, So let's go ahead and add. Hey, you You control her and, uh, it a place it right here. Gonna make that the initial you controller and, uh, name Day 10. Be a good shoulder. Like so, um all right, cool. So now or we need to do it's pretty to add a temple of you, and we're just gonna put it somewhere on the screen and going to constrain it. See your point from all sides. So it takes up the whole screen, and, uh, then how are we going to create a prototypes out? So this uh, openly optical every and we're going to see table for yourself. Visit the prototype. Tell that we need to end it because just dragon drop it on the top off they will be you. And while the seller selected, Cody attributes High Specter and basically cheese the style to be basic and just for the styling purposes. We can also like cheese accessory. Do we have details? Details? Actually, I think Disclosure Kindred Scared. Yeah, it is closer together. We're not going to do anything is off yet for this one. But it actually just to show you another thing that he can actually have thistle accessory Showing up on the basic gov screen where, like the safe, your impending a master detail kind of scenario that years over now that there's more information about this title available when they damn it. So maybe a topic for another day. Or maybe it's a good topic for tomorrow. That figure cover but desperate Ford. So we also need identify this reuse, identify and you already know is for basically reusing how the people of your cells that are off screen it's actually good for ah ah ah memory management. So for that reason, I would actually definitely recommend. Yeah, it's sort of, like, you know, initializing your sell every single time. He should actually define an identifier and try to reuse the ourselves, and they will be actually provides that functionality for you. Okay, so, um, let's go back. Teoh Date. And you could told her Excuse me. Get a creative outlet. Slow All this, um, gonna creating outlet at I b outlet week are they will view you I table of you. And we're gonna create another variable called data, and we just can hold some sample they didn't hear. So, milk, it's just like a to do list. Kind off data apples. How do you do? Remind myself, Do get thes. So I'm gonna put it in an app. And just that way it's over then. And it remembers what I need chicken. And he always did Salt. Okay, cool. So next thing names you is that we could create a refresh control. Okay. So, private, Let her refresh control. And you, I refresh. We're just gonna create it. I'm not gonna add it right now. I just want to show you, like you know, the difference before and after state. So up for that reason, just gonna will you A death. So we don't forget that it's actually they're not gonna forget because you're gonna have that. Is there self doctor? Tell you that Delegate his equal Do self. You already know that itself that they will. You don't. Dinosaurs is equal to self and, uh, then how we need to do it. We need to satisfy these Teoh denigrating Renaissance create an extension. And what is in that so datum You can tell her you are you? No, not you have a control ur table, you delegate, you are a table view data source. Like settle. Okay, number off rose. It's pretty standard. He already know this. Think they did not count and then settled for rural at index path and that they were gonna extract a sell out? Circles yourself dot Um, not self doctor. Let's sell and he could do table view, and this is their reuse identified. Comes in place de que we use identified with cell returned that cell cluster file and, uh, basically going to say sell that text labeled a text text equal to data. What? We haven't index Bath that role. Okay, so that is our table view. So let's make sure her outlet is connected, and then we're gonna run it to see the current state. Have you gonna come back and modify it to add refreshed control? So let's go ahead and run and, uh, all right, but success a succeeded, and there we go. OK, so let's go Day 10 and, uh, that you have all the atoms, readily. Let's sit here and that pulled town. If you notice nothing happens right now what? We won't do it when you pull down, we're gonna show a ah like Progress bar. And after a few seconds, basically that promise one is Do fresh data from the server or something, or some some other place. Basically. So, um, you pull down, you leave it. Ah, here we control the receives new data, and then you actually show that on the screen so that all can be cheap using or press control, including the indicators that show. So let's go ahead and do that. So we've already greater refresh, withdraw. All we need to do. It's first of all, let's add that to deal has itself that daily, that were a fresh control is equal to refresh control that we have created. Next thing we need is you need to add turn it. So still, stock refresh, controlled out ad target. And, uh, the target is going to be self selector is going to be something that we're gonna create. So hash selector and excoriated mattered right here at sea. Punk, add more data. Sender is refresh control. Okay, so our selector is add more data, and even that we need is really change privileges. Um, so let's had this much. And, uh, I'm gonna say now, when you what do you Actually, when you pull data, when you really like, you know, pull the day of you to refresh data, It usually comes like medium size is going to come from some sort of B p i r. Some sort of back end. Um, and, uh, what do you need is basically, it takes sometimes. So what do you do is you show progress Far or refreshing told shows a progress bar. And when that progress is finished, or about that data is loaded. That's where the progress bar disappears. And your table view has reloaded, so yeah, we? I mean, we don't wanna go, like, you know, implement a high on a P. I am do all that. So what we can do is how we can actually simply take this on and pretend that we have data coming in and we can just apply it, lay off two seconds and then showed data afterwards. So here's how you can add delay so you could say dispatch que done. I mean dot they think after and what we want is basically easy copter deadline and, uh, the time so weeks there were selected some every that's a dark now, plus two seconds. So this, too is in seconds. So how harmonies access you want? It could just put that in there. Adding to the current time, so and dark now is actually current time. So here we're gonna refresh our data. So you do is because it's helped out data that append. So here, this is their We have received data from it's ever had. Uh, we're gonna do it. I can't type for some beauts day Abend contents off sequence, that zone that we want and we're creating the right. Yes, A pairs blueberries, peaches and somebody. Okay, so that's good. Nothing really To do a self taught refresh. The troll that ended. Refreshing. So what happens when you actually pull down? Refresh control shows up the progress bar shows up, and you would actually end that by calling and refresh. So we call that and then you say self doctor, you don't reload data. Yeah, let's go ahead and run that and see if it is working. So you're gonna pull and there's a progress bar. We got a leap, and the time was already up, so well, reloaded. But let me do that again. So there you go. You've got nearly edit data. OK, so, uh, there's some more things you can do with this right now If you notice it's just a progress for so you can actually add attach a You can give it a color that's fall. So let's give it a car. So you could say south dot refresh control. Dr. Color Color literal. Yeah. Select the colorful Sarge. So I think recently his colors Okay. Okay, Doc, Refresh control that attribute ID title. So we also want to give it a title. Us. I'm gonna have a title showing up underneath. What's going on? So we just attribute table in this have to Beauty was framed with strain patching new data . Thanks. Okay, let's go ahead and run back. And we should see our fresh color. Refreshed controls, color being changed and a new text that's been added at the bottom. There we go. We're pressing you, Dana, and we have our you data loaded. All right, so that is it for today, sir. Video. I hope you guys in gentle and, uh, I will see you guys in next video. Thank you. 11. Day11: Hello and welcome back to day 11. And today, what we're gonna do is basically gonna create a tale of you where we're gonna have a real rink and delete sheltie Mabel's Okay, several. Let's get started already have. Ah, story word files created. Basically. So add you control her so you can say you, controller. Thanks. So as ad, let's just give dispute control ary class. So day $11 can add they will you. So this part, I'm going to try to go really, really fast because you've already done this happened two times and no access a review of this time. Okay, so go back here through this and we're gonna do is basically I'm gonna go ahead and a copy of the things. So from our biggest video, So chocolate and this and then Okay, So, uh, and, uh, the seven when I just drop it right here. Okay, you go. OK, so let's connect it till you make sure everything is working properly. So connecting all of you and I'm gonna run this real quick. What? It's ready. Um, we're gonna basically, um, Addy New button called added mutton. UK certainly is working and It's all fine. So, uh, always you go to, right? Eso no, on this tidal. Okay, cool. So let's add edit button. So, um, a few controllers are usually come with added button, and all you need to do is basically ah, at them. So you can say navigation item dot right button bar. I don't is equal to itself down and it button item. Okay, so if you actually do that, what it does is basically creates a Targo Ah, button for you on the screen. And it also has a state that actually e can listen to for the changes. So this is the end of it. If you quick at it, a change is done, and then when you dump it tends to add it back back to it. And so so you to do is we can actually leverage this l A. But do you know when the editing it's starting? So, um, puts fall? Oh, right now there is no, um, there's no delete any. Well, so I'm trying to sleep. Ah, this right collect. And you see no delete. Delete button right here. Uh, the way you can add, that is basically, uh, police say delete So you can say anything Style. Ah, and holding you to do it. You say If aiding style is equal, eagle eagle dot Delete In that case, data first your rule Fear data the index pat dot role And then you say table view don't delete roles at and expats and rule animation you can find how is items like Oregon to the automatic on a system. Just so if you run this right now but against years, basically, if you swipe left right here, you're gonna see delete button appearing and you can actually delete something items. So there we go and enjoy it and you can even swipe, keep swiping and automatically deleted without it, they do many actions. Still the last item. Okay, so that is the leading now, moving is there. Began the me A. So we're gonna need our Elliott from shelter to have two places you want to do multiple to Leeds and then he can actually use move are like, you know, anything. Sorry, not look anything state. So that's 30 united confront. So there is a method State entity is called set editing. Okay. And the Sea observer that actually gives you Theo editing state. So he's first you in a call centre. Anything from the super class in supply, anything that he had received an immediate that he had received. Then he simply answer myself that day, will you? That set editing, uh, and give it the same value as anything and made it. Okay. And now if you run and, uh, if you click on that button, huh? Thea edit button are your table you should enter headed State has all. So click they you noticed like you have multiple delicto and you can actually delete them one by one. Like so Okay. Is there any interesting And that's a today It actually disputes not exactly helpful for our moving is so so moving the cells. So the way we do it is that we say move row at not a camel muka row at, um, this one and you simply say let her room to move. Can you say data source in? Expect that we're getting here. So from there where we want to move, um, Dr role and then he do data Don't remove. Ah source. Next bad Doctor Row and Data Doc insert. And this incident is wrote to move so basically what we have last year before removing and then say destination and expats a doctoral. So where you are drop lesson. You provide this destination. So all we all we're doing is basically removing that item from the source. And, uh um, basically in surgery inserting that Adam had you an expert, and Taylor is gonna take care off, reload and everything. So, like, 11 had it. You notice this move handles appear and you can simply hold up and drag you down and you can move things around a bit, handpicked them, and they your debut retains that move. OK, so so, yeah, that was it for this video Hope he has enjoyed to video. And I want to see you guys in next to No, thank you. 12. Day12: Hello and welcome back. And in today's video, we are going to be learning about delegate protocol. So we're going to create our own delegates. So if you remember from a previous examples, let me open one s o individually. We always component to these. These particles are delegated tenderness, offsets. And then we implement their methods, right? No, this is a great way. Actually, do provide 1 to 1 communication between two different classes. But your article also defines a blueprint. Uh, like, you know, for other views. Eso whenever they implement that miracle, they confirm to that signature. But right there are sheltie. It's a great way to actually delegate on the functionality to the implementer, basically saying that this is the structure that he need to confirm to. So you're matter. Signature should look like this, but I don't care. Party. Um Thea Internal details. How you actually how you define the functionality? I just need Ah, a like, you know, that you defined return type and like, you know, it should The method shirt should look like that. So, for example, the number of rows in section is a, uh is a method that wants to find vertical off. Caleb, you that actually says that this is the functions signature, and they should return. Hey, data. Now, how do you How do you know or how do you see this is a political Well, he just simply do command click and jumped a definition. And there's a regular See, it says it's a protocol, and it has some antiseptic particle. And these are all the methods signatures that actually are there. So if you notice you have a number of roads in section and self for writing expat and none of these have optional available, but these have optional available. So if you remember, whenever we would get in error that they will you must implement thes protocols. It would not implement us for these other methods to be implemented, but only the one that are required. So that's how you could make your protocol as well do, like, you know, provide the functionality that is, um, that is just basically required or option. Okay, so enough, Terry, let's go ahead and try to implement it and see, like, you know, if we can make that working s o welcome to date. Well, and, uh uh This is where we're going to start. So we're gonna have a story work. We're gonna have a view controller, just like e you feel. And then we're gonna have another Uh huh. Class called. They call and of your controller, where we can have, like, add form where you can add more details. Okay, so and new item, basically. So let's get started with the storyboard so trusting, What we're gonna do is begin there, Get Are you controllers set up? So, what we need for this one, it's we need to weaken drawers. So you drag to up to be controllers right here. And, uh, let's make sure they align and everything, and, uh, mixing we need is we need service make this one has mean so in the show. And the classes they told you cantonal and this on his They well had until her. Okay. And you're gonna make a, uh, navigation. So Segway. So basically, just control drag from here to this other controller. And, uh, we'd have, like, this quick and going to give this ad You has it? I didn't fire. Okay, while we're at it was copied the and fire and create um, static. Let I didn t Fire is equal to this. Okay, um, less ad. They love you. And in the state of you do your points from all sides. And, uh, and let's add for types, all and this is that it makes sense to have the stranger indicator because we're gonna have discriminatory indicator. We're gonna have some detail. Uh, we don't have details, actually. Sorry about that thing. Is not that, would you? Um, so we can just leave it? We've already added, but we're gonna have, like, add, but that's where this is gonna come into the picture. So this is going to be simply a u I text view. So, uh, thanks to you. And we're going to say to your point from all sides and, uh, exchangers front. Okay, ask it. Okay. So that is that is everything that we need from the storyboard perspective. Let's go to tickle you controller, and that's going It's not let So I'm gonna copy theirs because this actually bring the same thing that we did the last couple of India's. So just gonna have delegated, Aso says, and then we can have our extension record like so Okay, so we have a saying Extraction distance. See that account and the cell. OK, so that is for this one. Daito, add you, Controller, we gonna need it. Takes of you click. So we just cleared that and that's about it. Okay, so let's first, let's connect these tablets. So it, Inspector, do you And for this one, IHS, thanks for you. Okay, now what we do, what we need to do is it's basically, uh we need to add a button that's going todo when when clicked is going to navigate to the other screen. So it's gonna add, but so had button. So we simply gonna add it to the navigation bars, the navigation? I don't that right are. But night is equal to you. I bar but an item and, uh, the I am is going to be ad You're just going to yourself and selector is something that we're gonna create right now at see funk and New item. And are you are bar, but my item acceptable. Okay. And here, we're gonna do it's gonna perform sec way. But then anywhere. And I didn't buy his take old ad until I learned fire and tender is so okay. And, uh, basically, we are also going to need prepare for Siwei. But let's first finish this. Okay? So better for a second. And maybe that's a Segway. Not I didn't. Fire is equal to date. All have a controlled ignited fire. Safe. It is this. Then you controller get to be controller from destination as Deko having controller. And, uh, we're going to do something about this. So, um, Mr Fall, um, Les do the same thing on the other one when you actually tap done. Um, um, we're gonna add a Ben button. And you, captain, he actually moved back in the subway. Okay, so it's true. That done. But so not navigation item dot Right, Barberton item is equal to you. I bar, but an item and tot done. Tell yourself selector is something we haven't created yet. So let's go ahead and create that, uh, did stop done button. Okay. And, uh, there's a flett, uh, text. You has text in it. We can extract that. Had, uh, we were onto something. Do some something with text, and then we're gonna say sell dot navigation controller dot pap I even told her anyway, their true. Okay, let's go ahead and run this fast. It tapped and his garden run it. Now we're going to see is basically we're gonna have a Wii controller. Uh, and when you tap on all right, there's a crash. It crashes that we haven't find the sell. So let's make sure are still heads. And I didn t fire. Yes, the problem. So let's give it it. I didn't fire and we run, You see? Ah, Daito. And like so we have to Adams and pick, click on add go back here. And if they don't, you come back on the screen. So get your brother. But during we can actually change the text for That's a fault. I was wondering, actually that I should have it do this having their next to go. Okay, So first of all, what do you want to remove? Distinct. So let's remove this. And next thing what we need is go to our digital controller, so Well, we, uh oh, actually, not everyone wanting me to do you did appear so super that you did appear animated. You want to make sure that our keyboard it's open and our text is focused when, uh whenever he shows up. So you're going to say become bus responder. Okay. All right. So what we need to basically, already to do is how you to pass this text somehow back to the that will be controller or whoever actually has called us view controller. And the way we could do it is by creating a delicate Okay, So that sort we're going to do So what we're gonna do? Yes, we get created telling it protocol year protocol, and then this just this delegate, Mr Baron, and you want to make sure so blunted by a class, something that actually class. And it's a very defiant the function. So did add new item. This is our function that one user to create. Where is using this? They should provide controller. So Okay, so they should provide, like in other efforts to that controller, like they bought big controller. And they should also provide the item that's being added. So, basically, could be anything could be a class. You actually have anything literally anything here. Okay. And there's optional function that we can create. This doesn't do anything like so So this is an option and, uh, you know, can only be applied to remember with that. Upsy So say that out. See? Has built it a tough seek and reused. Quit. Okay, uh, my bad. It should be like this optional requirement. It's a at Hosea. All right, come on. OK, Done. All right, eyes. That was something. OK, so, um Oh, now, the next thing we need to do is we need to create a, uh, ree Candler be choir delegate so people can confirm totally it and gets a dead walk. Adweek Toller delegate. All right, It's gonna be girlfriends to that to disperse ical that this guy has week reference to And , uh, this is where the magic happens. So all we need to do is a self. That delegate that did had new and resupply self, and, uh, we supply text that was printed. Our that was collected from the text for you. Right here. Okay. So whatever texas entered re actually called that I get and resupply the text. I said, Now, what were you to do? Is we go back here and we say, um, in new extension did well, Speaker told her day totals You're going to interrogate It has builders and issue. It's just this. So we fix it, we say, Okay, let's implement this and see how it's only created this non optional method. So that's what we need. And what we gonna do here that we are already being supplied? The the data that was entered service Simply going to say self dot data that happened item that was received and also lower real odor till so Okay, uh, now if you run it right now, you notice it doesn't actually return or head that value to our to our data. And, uh, we're gonna find out why. So, you know, at any and in their Breaston, it just dismisses that it doesn't head it back. I mean, what steps? Something that everything. Well, remember the delegate that we created, we need to actually say that itself is a delegate for the digital for you. Controller. So so is it telling it for date? Well, egg free controller, delegate. And once we have done that, let's go ahead and run it one more time and it should now populate, be there nearly edit item, so it will head honey in hand. There we go and bread and we have to bread. So we can do is we can say Well, fruits, Right. So that's how you actually create delegate our protocols. And that's how you actually pass information back at back and forth between one for 1 to 1 communication if we do different re controls. So I hope he hasn't noticed video. And, uh, I'll see you guys in next year. Thank you. 13. Day13: And today, on day 13 we are going to be talking about never bar changes. So what we're gonna do today is basically, we're gonna change this navigation bar that we have here. Um and we're gonna make some significant significant changes like we are going to give it a custom text. And are we also going to give it a foreground and at 10 color basically, And also we're going to give it its text colors. Basically, all these buttons stati see, like in blue color on default give us a chance at the white color. OK, so let's get started. So I'm gonna open storyboard and basically gonna drop a be controller. Although we not gonna do much in the view controller, Uh, because today's video is mainly focuses on APP dug it so but just for just for reference that what we're doing, uh, this is what we are going to be having better. So, uh, are he said, I love you controller and said its initial view basically, and also set day 13 you control her as to class. We're gonna simply drop a label, had the center center y network tickly, and we're gonna say it should have 10 points from boat living in trailing edges. It's just show up at the middle text hand. How are you going to give it hate font? So hi. 25 check out. Tell me, Have far and I'm gonna put the name Woody here. So let's put in a movie this on and president of So we're just telling our user check out the net bar and for the, um, we control itself. All we're going to do is we're going to say self that title is equal to never bar changes. Honey, Um, now that that's done, let's open app delegate and I won't actually come to this, um, application did finish launching with options screen. I mean method. And, uh, what were you doing here? His will first create a table called size after I've city float 24 points. Um, then we're gonna create font descriptor. And for infrastructure is the way where you actually define a new form. So you I formed descriptor and give it a name and sites, So name is ever mare next, and sizes decides that we have to point now. We can also say foreign descriptor and we can actually change its self It straight. So making bold and stuff because they fund descriptor dot adding had tributes. And this is a basic This takes an array off. Ah, you iPhone descriptor attribute. So we're gonna say attribute, name. Sorry, I had to. Name is already there. So attribute named dot traits. Somebody's gonna start detecting your someone actually type it out. So heading attributes And we're gonna say you I font descriptor dot had to your name that traits. And, uh, the value is going to be an array of you. I want descriptor dot traits key dot Wait. And this is another array and the weight issue. I fund that weight, Doc. Bold. So standby bold. Okay, so this is basically the description of the fund, and then we're gonna create an attribute. Ah, off type. And this attribute strength that key. And any type has value. And here we are going to give it basically some property. So Ennis had to be the string that key, that foreground color. And, uh, we're gonna use color literal here. Petrol. Okay, so it's not showing up, right? How you gonna use your eye color dot White in this case. The 2nd 1 is Ennis. Attribute that key. Um, that funt and this font is going to be Yeah, you. I fund and we're going to the one that accepts the descriptor. So we confined our front, we can supply our foreign descriptor and the size that we have created. Okay, um, so that's just about it. And then are we gonna say, Let never appearance is equal to you? I navigation bar that appearance now. Appearance start. Did Color is equal to color. Literal white Knapp are being a start bar 10 to color is equal to color, literal and to the different color Let's spread or pink kind. And at a bar in and start title text had to Rufus is you can do head to roots. Okay, So once you have said that list like sir, everything up us and we're gonna run it. And what you notice is, our navigation bar has changed. Two regular. And if we go day 13 there you have bolt text and white back button. If you go date off. Yes, you plus and back button to be basically teams to white. Right. So this is it. How for this Would you hope you guys enjoyed video and I will see you guys next video. Thank you. 14. Day14: Hello and welcome back. And today, on day 14 what we're gonna be talking about is, uh, basically having not only left and right navigation bar items or buttons, but we're also gonna be adding our learning about keyboard toolbar. So basically, we're gonna create a a tow bar on the top of the keyboard, and we'll actually show some buttons on their You must have seen these, like, you know, and tweets are like, you know, a done button to dismiss. Ah, the keyboard and all those. It's a nice little utility, actually, that proactive, flexible Teoh dismiss your keyboard based upon her your need. Basically, if you don't have, like, a keeper, that does not provide. It was during our a done but most like that. Okay, so you know what I'm talking about. How wants to see what you got and build it out? So let's go ahead and start it out. So have storyboard open, and it's got literally, literally nothing in it. So let's drag out a butte controller and, uh, drop it right here. Make it, Michelle. And, uh, I wanna say they 14 Qatar, and, uh, we need a label. So let's struggle toe level right here. Somebody here? Yep. And, uh, say keyboard buttons our accessories. Okay? And we caught up in it right here. Could just constrained this. So this about 20 points from the top and horizontally in Contender. Like so. Okay, next thing we're gonna do it. So we're gonna say text, text review. So let's get the text for you. Got it right here. And, uh, think initially, but 10 points from each side. Okay, let's change funds for these two, so all right, I said, Well, just sample text. All right, so that's it. Hobbiton. But this one has to go back to our controller. Yeah, I know. Duke is, uh remove all the comments and, uh and then basically creating outlet first. So at I b outlet week water text of you. You I text you unwrapped. Um, now, basically what? We won't do it. Ah, possible you on a launch. Our keyboard estimates the as earthy. The view is really appears. Basically. So So this curious title So So title is you cause to keyboard accessories, and, uh, we ended up here super hot. Do you did a beer animated this way? He actually can call sexy dot Become first responders stopped up. Okay. Said this way s actually estimates of you is opened. Are texting is gonna launch and let's connect that list. Make sure everything runs. Yeah, So let's go to day 14 and then go are, um text for you showing up and reason, uh, he would ensure because double sofa keyboardist off so that go. So let's try it again. And so what you do is create a, um ah, damn bar or toolbar right here on the top. That's always always sticks to the keyboard. So whenever keep what is up, it actually shows it would show some additional items off are choosing, actually in that. Okay, so, uh, this first basically changed a couple of things. So we're gonna add left now. Bar item. So left now. Bar item areas. They self dot navigation item dot left Barberton item is equal to you. I apartment night. Um and, uh, the sun is going to be cancelled. Just show you a DEA basically adding your own captain Great navigation. I know. So right. Nev R eight. Um so dot Navigation? I don't not right. Barberton item. It's equal to you are a far tonight hand. This is going to be called done with no action or selector in this case. Okay, so this trailer Okay, so we have left and right for items. So we cancel What done? Nothing really happens, but because we haven't right difficulty, but is I actually change now, what would you do? Do basically act upon So you can simply say targeting illegal to self in action is a selector, uh, off your choosing. And that quote that selective deal is simply call dysfunctions at autopsy funk Dismiss. We see this. Call it that. And it's a place. A result on justice are self doubt navigation the troller dot pop, uh, to popular Children. He made it true. And right here you say dismiss. All right, so similarly right, right now are, um, functionality unsolved. OK, so 14 If I cancel, I go back. Okay. Cool. So let's talk about keyboard. Cool bar. So, fortunately, it's me to create a very were vocal keyboard pool bar. You are a toolbar. Okay. And then we're gonna take you or to our darn size to fit, uh, keyboard to a Bardot set. Hey, come here. It's hard to be like, you know, heavy image, right? Which, uh, for position that any and part metrics how to be default. All right. And keep ottobar dot set shadow in which she consented, though. Ah, but in our case, we just given a leaked empty and position happy. Okay, um, now, um, gonna add a button from that. So let's add camera. What? For example, that camera button is equal to you. Our power. But I did, um, but again, there's on camera Are not castle camera. Um, so we can provide target, and you can provide Mikey. It's an accident. Are, But leave it blank for now. You can also give you an instant color so it gives a tent. Color is you go to color, literal, and escape it like, you know. Hey, purple, huh? Like so. All right. Now let's create another are basically let's just run this bust. So what? What we need to do in order to add this is basically we're simply going to say he board toe are dot items and the sticks an array, and we're gonna add camera. But into that and we're gonna say text, view that input excessive. You is equal to keyboard toe. Good. So what's going to is basically gonna create a tuba. And, uh, can I add that button her inside stupor and gonna add it, um, as excessive You far the text for you. So stick. Look, and then we have our button showing up. Okay, Um, now what can what else can? Yet? So I say we can add We can add another button. So you had a trash shaken. So I spartan crash button who have are written, um, button item. And, uh, this one is trash. Our target again is nothing and nothing. And hi, ikan not to color is you go to color Natural, And I'm gonna use the same Gar just for consistency sake. So I guess, um, you're using this one. Um, maybe SC I see you sing. Hey. All right, so, uh, now okay, let's just on this. Now, let's say like, you know, if you want to add it here. Trash. Okay. Help! He noticed our patents have started. We started adding buttons from the left side and, um, in order to ah, go on the right side basically would have to actually keep moving this direction um, now, what some other options do we have, like, you know, um, So what can we do? Basically, first of all, what can we do to put some space between these two? And what can we do to show our something out here? Okay, so there, too. Two types of barbarians, other purely layout based, they are basically there for layout, and they don't have any visual appearance. So it's uncalled face space so we can creatively space. We can say let fixed space. How are you? Are our big night? Um and, uh, you can say that next space, uh, thistle nail and he actually say X place duck wit is equal to 20 points, for example. Now, what can you do with this? And you can actually insert it between these two, so you can say fixed space and you can actually have not. Burton Lee, you're used to pick space one more time after that so that it's going to add a bit of space . So I stick it out and, uh, take you can see it's a bit a little bit more breathing room between these two. Now, let's, uh let's say like, you know, you. Can you? In order to move these cycm we're here. Uh, he can add a whole bunch off, fix space like you can covered with and then divided by the fixed base in, like, you know, put a space. But with such such that, like, you know, sexually equal to the vet minus thes base that you want in, you can be sure, but that's that's a lot of work. There's a better way to do it. There's something called flexible space. And, um, that one is visible just like this one picks. So, Lex space is your bar, but nine, I keep choosing quite you choosing this one, Um, that flex civil space and, uh, tone, it is nil. It's like that skinny. And he's simply, um, create that in inserted, for example. Right here. I'm just gonna do it for Democrat possess, but we're gonna create another button, and we're gonna protect button on the right inside that way. But look, actually better we have been have two buttons on the left side and one button on the right side. But I just want to show you how it looks. So this is how it looks. 11 Okay, so what can you do? Is you creating book marca, but yeah, Dalit bookmark button. You are a bar, but high item can, uh, God bookmark no and no had basically here to tempt color, so core little and, uh, But it is the 2nd 1 right there. And, uh, well, do is take this out and our flex space here. Hey, uh, the park. Oh, sorry. Okay, so let's do this. And then we will do an experiment. A little experiment, So a cyclic protein. There we go. We have, ah, three echo showing up. Now, let's do an experiment. So let's take this, But it by here example. And we're curious to know what happens here. I already know what happens, so But I'll show you, like, you know, a surprise. Now, Uh, yeah. So what happens? Basically, they're flex space is Catholic and between items, so it's gonna so if you are not like, you know, if he have a do bar and you won't even distribute things out, he can actually do it this way. It just works like a stack of you. Seek input, like, you know, like space between items and the Army click, and I calculate their spacing. And they're just gonna basically find out, like, you know, how much is basing toe? Do I need basically to expand out and we'll remove it? Huh? I just said I want to show you how this, uh, little trick basically to set the flexible and the fixed base for your bill bar. But I still like the set. So I'm gonna What did that put it back like that? Okay, so that's that's about for, ah, studio. And I hope you guys enjoyed this video, and I will see you guys in next video. Thank you. 15. Day15: alone. Welcome back to day 15. And today we are marking half off our journey so that stay 15. And, uh, you know, for this how are we gonna learn a little bit more? Basically, this is a slightly complex example. So just bear with me and we're gonna get through this as quickly as began basically and learn a great deal. So what we owe, we're gonna basically create Hey, custom cell for the daily. So you've already learned how to create they will be and how to create is different things in tell you, but we have been using Thea pretty defying basic cell. But this time we're gonna create our own A prototype cell, and we can use that and we'll have, like, you know, a whole bunch of data that we're gonna load from adjacent file. So for that, we're gonna read a file from the bundle steak and learn how to out to read file for the bundle. And then we also gonna learn a bit about portable and decode herbal protocol for G song forcing. So if you've used Artem t some parking but not Jason pursing in past high, you know that like helping full it could be like you have to do if lead in all these things . Now all that is gone and quotable has made things a lot easier. So that's what we gonna do today. So let's get started. I already have the project set up and ready to go. So let's add hate you, controller. And I'm gonna add it right here. Make a bit room. It, uh, you select this. Make it, um, take 15. Any hilly consoler like, so I called. So, um, what do we need to We need table and has been it at 300 on all sites and, uh, at eight. Till yourself. And it says I permit. I felt so we're gonna make it a little bit big and, uh, reading. Basically, we need a label. Sorry to liberals and other than image. Okay, So what we can do here is we can first, trying to reach out. So you are image. Were you a living out of the used image right now? I'm just gonna put right here as a place over. Okay, so So ASU, with tin height to be 60 60 and, uh, leading is going to be 20 hand center vertically. Thanks. So okay, now, the next thing we need is a couple of labels, so label you go, There's one and option like to copy. And that's the 2nd 1 Uh, this Make sure they both are off right front. And that's good. Oh, no. Give this one a dark, great color and, uh, give this one a little bit lighter. Um, that this kid. Okay, so, uh, I think it's gonna be dark and this toward by, So let's take a color and make it a little bit daughter like so this is going to be our title. Scooped The subtitle Now, subtitle used to be a bit smaller, so this do societies 7 to 15 and this constrained eat out. So this is going to be 10 points from tough and, um, 10 points from lapse. Dent points from right. Okay. And it's upto is going to be elevated under a sink is gonna be 10 points from all sites. And, uh, you're going to see an issue. So this issue is because off this bottom constrained. So what we're gonna do to go like that and we're going to say is not equal to, but it's square than equal to okay. And that is going to make us basically give us an opportunity to provide multi line texting him there. And Texas Grant grow based on the need off the capital. So with that, I think are set of its depth. Now, remember, home our main focus here is to learn about how to little data from days are. So let me copy some data, and I'm gonna pace it right here. It's still read, um, data generated online. And, uh, you can actually use this, By the way, I'm gonna have all these, uh, uploaded all these projects uploaded in a single file so far today. So Monday, 15 you're gonna find all of us, and you find that the cell has all inside that, so you can actually simply copy and paste it. So, um, so this is a Datafile. Let's go and build our model data model. So, for our data model, what we're gonna do is, uh, we are simply going to screen a class day protein data model inheriting from portable. If you inherit from coachable, that is gonna make our life easier for Jason parsing and you're gonna know you're gonna see , Like, how is eaters, basically, once you adopt to this, Um and, uh, your keys are your Jason keys are exactly similar as your properties. Then it's a single land of quote him. You just Bostic is done. So let's take it out. Jane out. So I'm gonna have an accident copy based all these properties because I already have that. And I want you do see me typing on these and make a whole bunch of mistakes. OK, so these are all the property. So one key, uh, point is that thes names off the properties are exactly same. Has these keys right here and there. Types are exactly same has what we have, um, in the d zone Fall. So yeah, into your strength. So now, um, I'm basically the point where we actually dread the most. Parsing Jason. Well, Cody will has made it a lot easier, so let me show you how So we're gonna create static function. Um, parse data, not bust Fada state. And what? We're going to return it in a way off day 15 day tomorrow. So first we gonna read path for the bundle. So we can actually access this file. So we're gonna say Let, um if let path is equal to bundle that main dot path, uh, for resource and resources. Uh, this file right here. So just copy it. And, uh, in a basement right here, there's a recess off type jesu. So that's the exception. And open you coast curly. He said do so Duke to do Do try catch. Um, yeah, you print theater dot Localised disruption. Okay, now, next thing we need to do this, we need to first try to. So this is how we get the file. Now you get the data from the file, so we save data is equal to try data and get contents off those. There's any slither called contents off euro with options. It That's what we're going to say. And you are always going to be you all file wit pat and brought into bath here. And then how the reading options are going to be mapped if c So this is going to get a state of and now actual parsing serving. As a result, our Jason result Jason result is equal to trying Jason decoder J some decoder exercise decode off type. And this is eso to sit living, typing out? No. Tell you what it is that self, huh? And data. So if you go in our s Oh, by the way, this is, uh this is as simple as that. Basically, this you parse Nautico data is incredible. Portable to single line. Now, this parameter right here depends upon what your just gon file structure. So ah, in my case, um, we haven't array, and we have an array off objects. So that is why what? What we have done here is you have said, like, you know, this is an array off data day 50 data model and self basically itself in order to identify this last. Okay, but imagine if this wasa hickey value. Now, in that case, what would have happened is, um, you would have, like, situation something like this. So you'd have, like, you know, um, key. And then you have, like, an object I felt. And thats done, Ray and one to see a Jason. Uh, so in this case, what you would have done is like, you know, you have said like, you know, Day 15 data model, and then within that there'll be another problematical result, and that will be the array. So it's sort of like in having typing this high, you simply type d 50 didn't want yourself. And you're going to create this property, for example, as in a right. Okay, so maybe we'll actually taken example in future and build something out like a movie app movie, searching for something to show you more. He's guests, but yeah. So this is how you do it. And he just returned results already turning You return Empty array. There's nothing found. Hi. Uh, that, uh, let's go ahead and go toe. Are you controller and type some code out over there. So first thing money to do is create I'd be outlet week. All right. Week are table you who are table? And, uh, we're gonna create day down data export to day 15 gmo. Hey, supplies it, um here we get the same. Tell Torto you don't delegate is equal to himself. Fell down till you don't. That's so city called yourself Data is you go to day d d model state. That's where we're gonna get our data. And, um you idea, will you delegate and your Dennis. Those number Probably night in return, dana dot to count and sell for for next month. It's interesting because we have to actually defined the cell. So what we don't do is we'll just create a class here for little result against a class day 15 table view cell. Um, you are debo you so and simply going to create three omelettes. So the recovery based we gonna show name an adverse is basically So that's what we have here. And here we're gonna say it again. Say, let's sell is equal to daily dot de que, uh, beautiful. Identify as a day 15 table view seven. Okay, this is how you cast to your own self that's supposed to return to sell. Um, and now you can start populating these things so you can say, Tell that name labeled text is equal to data. The next bad start to roll that name. I can combine this in one called second Say object that we're trying to Excess is right here. And, um then all we need to do is say objective dot name object dot address. Okay. And, uh um, what we can do is, huh? Let's grab example Image. So I'm actually, I'm gonna grab a whole bunch of images. I can see if I can copy and paste toes. I don't think I have anything. OK, so got some immediate. It's a random images that I have actually picked from the Internet. Okay, so see if I can grab all of these. Okay. So, um, I have some of these images And what will you do, basically, for our demo s. So we are simply going Teoh call this the way we are actually going to call it is gonna render my sister. So let's go here for the image cell that I am G image is equal to you. Our image. And right here we're simply going to say named, um and I'm gonna say this is a strength image, but, uh, arc for random uniform, and I'm gonna take 27 because ah, I have about 26 images, so it starts from zero, so about it's gonna generate about 27 random numbers and assigned these 27 random numbers at the arc for enemy inform is just a way to generate a random number. And, um, it's just gonna basically a sign that and, uh uh, good. Pick that image. Which hero emit one miss to count like that? Okay, um, now, uh, it just gonna decorate Good ism, fence sitting fancy things to image. So we're gonna make it border color for their color to be color natural, uh, slightly yellow and, uh, celled up him. Just dot a star player dot border Quit as you go to climb. Get, um, we also my gonna set the, uh uh huh corner radius to be 30 and, uh, tel dot image Got a player dot Clip her mass to bumps. It's equal to true. Okay, But that done, Let's go ahead and fix on the issues. So we have not to find a reasonable self. So you could say So. You gonna connect her? Are we gonna give ourselves hey, class something and say it's going to be day 15? Tell yourself and, uh, let's see. Pictured in which is connected to image. Name is connected to name, and the address label is connected to dissipate level right here. Okay. And they, you could told her, has a reference to deal with you. So let's run it to see if we have done everything that we could and everything is showing up nice. Okay, so day 15 There we go. So as you can see, we have our images showing up. And if you notice for some thes are the address is really big. Search traveling to lines and the height is automatically adjusted. Do basically accommodate the change that is called basically automatic. It's called automatic height. You and they will be automatic dimension on. You can actually have, like, you know, automatics. Height created, which actually helps you out because you don't know how your content is going to grow, especially and gets off Texan stuff. And this is how you can actually how basically have that, uh, created So, um just think I need to provide title entitle is my contacts. So go ahead and run it one more time and select day 15 and then we go So cool, right? Somehow everything's showing up nicely. Okay, So is it for this video? And I hope you guys enjoyed to video and I'll see he gets the next video. Thank you. 16. Day16: Hello and welcome back a day 18. And today we are going to be building a indexed table view. So basically, we can have ah, list off cars in this case, and we can basically show and index just like your contacts have, like, you know, a greasy the next on the right inside and taken basically tampon. Those in access to jump on that section off the table. You. So we're gonna build that out. So let's get started. I have a simple data, uh, based it here in the in the view controller already. And uh huh. So you don't have to, like, you know, are here. Have to see me typing all that, so just copied it from the internet. Hey, I hope you do is, uh, we're gonna add a A good told her so inside of you controller. And, uh, I sat two of you. And while we're at it Okay, let's constrained this out. Deal points from all sites. And, uh, and then hey, cell friendless gives a cell. Hey, Reuse Identified to sell our type to be basic and, uh, sect sponte her next. Done. Ok, so that is I was completely head Let's give our Butoh. Make sure you control. It's in Chile, Controller. And, uh Hey, stay 16. You controller of the class and less Jimbo were in even drawer and, um, basically write some code. So posting, uh, nothing we can get modeled. So had I be hardly a week. You are. They will you? You are ideal. Oh, you okay? And then we need a couple of things. We need a Babel for storing car state. A model that we're going to create from this. And we're going to create section titles that extract again from the cards day tomorrow. So car model and it is going to be a string with an array of string victory where key is a string and values and worry up straight. Okay. And, uh, section title is your only strength. Like so. Okay. All right. So this sir, is assigned delegates and stuff. Uh, delegates. Don't you need to go to self, Dana? So's you did help. It's up. I'm gonna create a function here, and we're gonna call it It's a populate data, and basically, we'll be doing this. Hop up in their data section is that we're going to go over the car model and popular. It used to thes two labels. So let's call this populate data Who forget and thats going extension quick. So okay, number up froze in the section Ah, section title that cunt. Actually, we're gonna keep that for sections, A number of sections. We're gonna have learned that. So you can have different sections. Affections is turned section title not count. Okay, um, number of roads is basically we're gonna kept from section, so you can say let key is equal to section title. We couldn't get there Section title from section that has been passed here. So get detection. We're gonna find out all the we can extract all the values from our dictionary. So car model dictionary. We can extract that section, uh, values out and then returned that value count. Otherwise, we're gonna return Theo. Yeah. So, uh, I have to Sister, Basically what we're what we're doing is we're simply because so because dictionary is something that we cannot like. A keeper decrees arbitrary data structure that stores data. So we are going to keep, uh, like, you know, what sections are in a separatist available. So if you're gonna keep second saying that separate really well. And they were going except out section based on index. So whatever index you're looking at with an extract section title out and that is the key that we have, actually. Ah, we have actually kid off the stick, Cherie from the Rigoni's that key to find the values extract valued out from the dictionary for that key Zona este efforts a Then we're gonna have, like, you know, Audi. And thus Esther Martin, short cover. Okay. And then we're gonna return the count for that. All right? And for settled at in next bath, we're gonna simply say, sell that for what it is about taking sailors Cell is equal to table. You that Thank you with views that in fire Respect, sir, to himself. Okay. And here again, how we first gonna get the key. So we're gonna say section title, index path, doctor section. That's how are we going to get the key? Um, and then we're gonna say if values that we get so car model um, sorry, if lit. Rather, you said you do car model. So if you get that what we're gonna do it, We can say, Sell that text a little text it equal to values. And we're gonna get that particular values in express, Doc Roll. Like so, huh? And in return the favor. So we're doing exactly same thing that we're doing here. Just here. We're returning the entire release countin here. We're actually further are going down to the index index Start row. So index off a value could be a showing that high so that it's done. Let's ah first actually populate this method. Our data. So we're gonna say far car in cars just to fall. Ah, we can stay. Let current car key is equal to and we can actually extract the first little out. So, guys, a car got prefix marginal and one So basically, we just gonna extract first let it out for swat you say if you are car entries. So you say if card data car model already has this current Karki, right? So it already has that we are simply gonna add this value to That's a car, uh, entries that append this car entry this car. So if there is a car with prefix a already exists, that means the dictionary has, um a list or uh, to a then we simply gonna whatever the value to beginning at so deserve values. So basically gets to say values That's being that being ST for the car so values don't depend. Um, a car The current car that we're actually looking at else we're gonna dio is we are going to say car model is equal to I mean, Colorado. Uh, current car key is equal to car. Great. So we're gonna create that first country. It was a pretty that letter. Doesn't think this yet. There's almost think that mean Thio Thio Do it. This is a car model. Great. Karki is equal to car. Oh, my car rallies. So we need to make sure that we override that, uh, that key index Okay, we need to do one more. One more thing. So per section title, we simply gonna say, um, you're going to extract out string and sing Guerry and gonna convert Chris scenery car No darkies. So all the letters we can actually strike them out on the keys you can expect about and converted into a string and assigning to section title. So those are gonna your section table next thing, we're gonna ah, sort her section title, second title that sorted by. And this is where you can actually apply closure. How that first value. It's less than dollar second earlier. So basically, uh, applying descending, not descending, huh? Um, yeah, basically sorted, descending. So basically a is gonna come first, and he's gonna come last. Okay, so that's connect our do you control her to table view and less Roddick ones. So you wanna see, like, you know, if there sir Display section title says, Well, like named for the section that we will No, like, you know, that teacher of the section that also see section title. So the method is section titles, dissection, index titles and we can return Section dental And we're also gonna need a title for Yeah, you're so far. Have you had the index? And that's what the second title is providing. But we need the title heading That's already went So title for header in Section We Return section title section. There we go. So what gonna basically we'll see different sections and but in those sections. So if you notice we have a section the section C section D e a D f. He's not Besigye's president in the list. So if you click on B o r p click on a gone T. C um, you know, jump right on those particular sections where they now in your list actually grows really big. That's when I say this is quite useful. And you have seen this already in action inside your context up. So this how you use it and this is how you create. Basically, you just take sections total of distractions and you just return them. And that's that becomes your index. That actually shows up here. Okay, So hope Yes, I judge city and I'll seek as an experience. Thank you. 17. Day17: Hello. No, come back. And today's ah video, we are going to be talking about data modelling and basically creating a class related to our data model. Populate that class and using that class inside a table, you controller showing them under a section. So basically, what we're gonna do is we're gonna work with this movie data and can actually populate these movies and show them in a table view with its sections. And basically, these movies are going to be stored in their own categories. OK, so, uh, so that's the, uh, the item for discussion for today. So let's get started. I have a ah, day seven day 17 model created, and I just have, like, you know, sample movie data basted in here in ray format. So this is what we're gonna work with. So let's first are basically work with the state up, so actually moved this town. So we have, um we have more your state toe work with and posting we're going to is we can create another class and we got a call, this guy's movie genre, and that's going to be a name after I think that's a genre that we can. Actually, I think it will be, too. And, uh, basically, movies take beginner. Oh, that we're gonna work with. So Day 17 model, actually, contains are those movies. So it's an array off day 17 model. And that's what town and actually used Teoh basically create hold properties, although, like in a you can name it to be, like, you know, movie a model or something like that, if you like. So it's creating the Kaiser and the PSNI. Sizer is going to accept Thinks it's gonna accepted string, uh, off name, and it's going to accept movies Day 17 model. In my case, self that name is equal to name has so dot Morris is equal to more. All right, so that's it for this? Yes. This is just going to be like, you know, a high level a rapper glass that's gonna have all the genres, uh, stored movie stored based on their genres. Um, and then we can use that So they a little bit opposite. So earlier in the last video, we actually So how We used a dictionary to show the sections and everything, but I want to show you how in real life Ah, you actually create your section table. So what What do you do? Is basically, you create a model class and that that model clouds, you actually defined categories, and he filled those categories in table three sections. So that's how you when you don't parsley really partial data inside a dictionary, right in the view controller. But you have a model that actually created you created based upon your, uh, data that you're receiving from the server are from the FBI. Okay, so, um, so let's create a couple of properties for D 17 model so we could have movie title. What type? String? More. We cost of type string, okay, and does the only two property. Then we can create a function s Oh, this is gonna be static function. Static bunk populate movies. We have do anything in return movie genre through this. Okay, now, there. If you takes their few wearable. Secondly, to create west her, there's a result that we're gonna return. And this is a movie genre. How, Ray. And we're gonna richard that right now. So, you know, forget about it, then. We're going to create a whole bunch of far categories for each section. Ideally, yes. It er downloading data. You can actually create this on the fly based on the general's. Yeah. So you can First, our European is gonna first, and you like, how many general there are. And then you create like you're different, Different, um, different blank, you know, raise or like, you know, dictionary raise Our dicks are not actually a dictionary with a raise to basically save those Chandra's. But in our case, we know that another only three, they're gonna create those three in a very well. So action always. And a day 17 model, uh, comedy with And you're gonna have ah, day 70 level again here and then Illustrates what? There you go. So, uh, next thing we're gonna do is we're gonna go over each movie in moving model armory data basically, and, uh, and start parsing the day down. OK, so let's do that. I'm gonna say if movie that we have current we're currently on if genre, Ecevit has key called genre. If Julia Chandra is equal to action, we're gonna put it inside the action. Um, it's like the action Babel. So you gotta let we you go. Teoh Day 17 model. Um, can't, uh, you say, uh, are am actually, so m dot We title is equal to whatever we have in movie as title. You gonna get that title right here? So dot or we cast is equal to movie and whatever we have in the costume that story back like so Okay, so that is that is basically our action movie are one movie that we have actually, uh, passed so actionable we don't bend And what we're gonna penned here is in, like, now, um, So typing this, I'm gonna actually copy this. And if the genre is action Sorry, general is comedy. I hear someone actually comedy where we sit on bent and last one is trauma. But so generally is drama. And from who is no there now, at the end of a gun, Teoh is, uh, you gonna say result that bend and, uh, have name. So it's gonna be action. So this is a title that we're gonna show and action movies. It's the day down results depend movie genera Name is comedy and, uh, last one hes drama. Okay, Okay, So that's going to actually give us thes movies in a positive object format. And that's what we are going to use in our in our people over. So let's go ahead and get started with a storyboard of us, maybe controller and, uh, a Sinus. And you show day 17. You can tell her I said, Do you of you? It's sad. Hey, Phil. And it is going to be this Hamilton, choose that title. So interviews I didn't sell um, being a choose an image. I love you. And you too. I just want to show you like you can choose an immediate so you can actually have a static image. But this is for times also really need it. And we don't have like, you know, movie titles are movie images. Datasets, so don't worry about that. So if you don't set anything is not going to show up, okay? And the subtitle fund is something the money to actually make sure 14. And I do. Okay. Okay. So that's perfect. Now, um, let's go ahead and create Noblet. You already with you and let's connect it first before you forget about so that we go. So I guess we have everything that we need from this Yes. Okay, so, uh, let's get started Post. We're gonna create people data. I'm gonna say movie. I think they descending model that probably took movies s so that we can populate our anything, I think. Do iss simply sign that table? You don't tell it physical herself and so will view the data source is you call yourself a small uh Then it's creating extension and 17. You are your table e table, you delegate and your table You Carso's number off number of sections with eating energy dated on count because that's our sections Never will be generous And ah, title for Hever Let's create that it'll settle or in section and uh huh that is actually her name The return they up data section dot name That's going to be a title I can't man number off. So a number of rows infection So basically what we're doing here, it's like we know our data is the movie genre, so we can get like, a movie genre right here with this data dot section, and then we can access his name, and that's what this election battle is going to be. And this is just movie genre how many Tundra they are So is going to conduct that. Don't, um so number off Rose is going to be data section. What dot Movies that Count Skinner return us taking a harmony rose there are and then sell for row and expat. Let's sell is equal Teoh table view that dick You sell her term So sell got first Let's take the movie out So it is a data and what we have here is basically affection and expats two section eso we get, like, a movie. Um um, out of this, like you know, a movie genre are this and then we get movies from here, and then we can we extract out movie through an expat dot ro. So this part gives us that movie genre that we're looking at in the section. And this part gives us that movie in that particular role. So because they sell that text labeled our text, it is equalled. Teoh movie dot We title and so dot uh, detail. Thanks. Label that text a legal to movie. Don't more we constant. Hi. Listen, rapt he's And with that, I think we should be done. Make sure you run and I think about Santa, basically take a look. Correct. So take a look. 17. They 17 and they go. You have action movies, comedy, movies and he have drama. And if you notice are Header, it's sticky in this case. So, uh, so that's actually drama comedy and action always. Okay, so So Yeah. So this is how you actually create different sections. And, uh, this is how you actually sort off populate your sections through the data model that we have created out of the data that you receiving Jason Farmer from the FBI's. I just want to show you an example off that So hope you guys enjoyed this video and I'll see you guys and they still thank you. 18. Day18: Hello? No, come back to Dating. And Leslie, What we're going to be doing is that we're gonna be creating a mini of Web browser so we can actually have our own Web browser with a title bar. Go button. And you can t use Chester. Do go back and forth on the web browser. So let's get started. I have day 18 s. We were open here. It's got literally nothing in that cell. Let's get going. I'm gonna just drop a weakens owner on the scene and ah Xing we need is a heavy spar. It's a taxi. Basically, that's gonna act as our head as far. Drop it right here, I guess. Yeah. Okay. And, uh, then we can that take a button. Thanks. So and we're gonna name this one. Go. And what we're gonna do simply is put them in the back. Were you like that? And in that stack view, 10 maybe eight points from each side. Like so, uh, now wealthy. Exactly selected. We don't want everyone like, you know, a little bit of space between those two s 02 points. Um, beach distribution, ISS Phil and that actually, pigskin. Okay, so next thing how we need a web. Were you? Well, kit for you. That's what we need. So make sure you don't select where beauty is deprecating now. So what you need is Web get view. So you just take that and drop it right here. And this is gonna be our rendering spade a space. And this is our, uh, Beijing is going to show up, so I'm gonna actually give some constrains. And, uh, there you go. There's some properties, actually weaken Select right here about this. So for example Ah, ikan. You can say like, you know that you want backward gestures. The section is the default display of the thing is is default airplane. More picture in picture is allowed. Um, and for number Holy the identifier. JavaScript is enabled. So I guess everything else is is pretty standard, so we can leave it. Leave it like that. Um Okay, so once we have that ready this, make sure we have. They said assassination Wii controller. And we have a day 18 we controller as a class for this one. Let's go back to our view. Gun Children start headings. Um, Cord dio support our eyebrows are hard Make it functional So we're gonna create couple of outlets week Our address There you are A text field and happy outlet week are web for you and this is WK Who m are you and reason It's not detecting right now because we haven't imported web get it so also important work It is going to start recognizing wk view. I get so on beer alone Are we simply going to say Well, you've got navigation. Delicate is he called himself and less good phone to the delegates civilians the extension day 18 I even told her and, uh, this is going to be wk navigation telling. Okay, so this is where can I receive some of Devens? Uh, like her, for example. Ah, you can say that you want to hear about when the page finish loading. So did finish is a delicate matter, Deacon actually listen to you could say basically in this Ah, you I application dot share dot festival is network activity indicator Investable house. Every fault he was not going to hold stopped from writing. The next thing is actress part our text. We need to update to whatever that view has salt you are home to. So what happens? Absolute string. So what happens? Like sometimes, Like, you know, you may notice if you go to www dot google dot com and Google has a redirect that redirect is the New York Well, that's gonna be set in my view. And that's what we want actually put in our address bar. So it reflects, like, you know, what are the latest page as being shown from or visit restored from Basically. OK, so that's what this is for. Um, next gonna have You did appear, um, super taught you did appear animated and, uh, simply address bar should become a first responder. So we have, like, you keyboard, lunch, estimate three. Get the pace loaded, and then we're gonna create I've reaction. Funk did tap go and singer you are, but in, like so and basically what you do it, you say it's up that you dot end editing must have felt, uh, so the he would've distressed and then he say, guard, let must less extract. You are a lot off the thing that you threats type so string address our dot text. And if that is not true, If it can't create a You are a lot of this. Then we're gonna simply return. And if we can create you, Earl, that we're gonna say wherever you don't load and simply say you're on request and requests is generating out of euro, and the girl is doing that we created just a minute ago. All right? So that I think we are set. We just need to connect for you. Think so? Let's go back to our storyboard and go to outlet. Inspector Pictures are address bar is connected in the view is connected for the outlets in actions is the go button is basically touch up inside that Go. All right, so let's go ahead and run this and take a look. Hey, are many browser? It's working. So, uh, good day 18. And, uh, there we go. So you're type a ccps ical and also studied every day dot google dot com We could go. And there you go. You have Google showing up here, And if you click on image, um, you can actually type in image something, and it's basically just show up. I'm just Well, I just type something random and and, uh there you go. It's fully interactive. Basically. If a brother, that's what we have. Okay, One thing you notice are go Button is gone. Eso One thing I think we need to do is we need to provided a content hugging. So see if we can actually, um, make this not not disappear. So, uh, are button needs to be so First of all, content hugging should be retire. Um, and then horizontal and vertical for content compression should, like, highest priority that we do that. It just running for more time. Okay, so who will? And it depressed that. And there you go. So, as instead, you notice now are go buttons not disappear anywhere. Despite our content is basically showing up quite a little more change. I need to actually added clear, so use actually tough on it. We sure Clear button. And it's very easy to boost. You just stay clear, but, um, appears when heading. Yeah, so but last, huh? Run. And hopefully that will bring us everything end. We'll be done. So, uh, steak, Look 18 and retired. SCP, kalinda slash Dairy, Dairy, dairy that Google come and we go if you notice are Ever since she's to Estes ups. Then that's what I was talking about when finished loading. We actually get best. New York every can type. What new? And so, what's new? Uh, you get a full get a full. How webpage. Right here. All right, so let's to me show you how the, uh, back in back, but everything works. So go to this page and a fee track. Um, not that one. Huh? Say you track. Okay, this is the two drags two districts, stuff taking place, a stable lock her stride again. SGB s core no slash www dot google dot com and go and you say, Yeah, what's new? And you dio a back here. So I say new if I hit. Okay, so it's something else. Okay, So basically, there's a gesture. See, if you drag if you're careful. I mean, ideally would be awesome. Like, you know, if we can have a couple of buttons showing up that actually actually do Google, Doc. Oh, OK, so a couple of buttons here, uh, to go, like, you know, forward and back. Just like traditional problems of stuff. But this back button works as well, And, uh, I know very well that it actually works. Really Get so So you don't have to like you precision it. The fact is, like, you know, there are 22 controls in place. There's a navigation. Back is a district is in place and that is one for the view. So So I guess, like, you know, you can try it out. Like, you know, I just put it in a on in independent, or like in the standalone app, and try it out, and it'll work. Otherwise, you can just have, like, you know, out back and forward button. And it's just a property or a couple of properties that he can call for November. You and that should take it off that right. So take that as jealousy and try to come up that if you have any questions, you can always message me. Uh, yeah, that saved for this video handouts. See you guys in next. Thank you. 19. Day19: Hello and welcome back, Teoh. Day 19 and hope y'all are doing great. And, uh, eso you gotta continue here from, ah, yesterday from day 18 where we actually created or veb you our web browser. Are they were hard going to be creating Have your handling our dedication piece eso and you already know, uh, Polo introduced local under our authentication not probably know that slow local authentication, but touch i d had face id's her to attend get user are based on their identity that has been set up inside high your phone. So and they also give developer ability to basically leverage that and basically use it against there. So that's really under trait. Uh eh. So we can actually build a simple screen that's gonna turn green or red based upon our users. Ah, authentication, mashed or not. And we lost them to either. Like, you know, you start I d For like, the phones that arise iPhone eight or earlier and, uh, basically face I d for, like, access and for iPhone next excess and excess max. So, anything little the night from X that has face I'd capability. That's from you know, two. Okay, So let's get started. The, uh the library, actually on the execute that actually provides that Ah, ability is called local authentication. And basically, it's just like, you know, like it says. Basically, leverages are the indication that is locally, like, you know, president within your phone. So it uses that to authenticate user against our their credentials. So first thing we do is difficult and portable dedication. And then Hunter, you did appear we're gonna call super dot beauty tapir thus far. And then how we can actually read the function called our youth center. But by a metric this way, we gonna handle Pote touch I d as well as race i d. So we're gonna first take a look how to use society on and then you can actually use face I d. And then we're gonna see we can come back and see like heart HIV. How face I decode also works with such ideas. Oh, look so but just this was called us self dot house with Aussies of this pirate tricks and they let contexts is equal context l a context is equal to help lay context and it's like that create localised raised reason message which is going to be presented so localized for this has got to be used in our dialogue That's actually presented to user asking for their permission. So are sewn, actually, for a what do you with the authentication out there? It's just in its air, um, that we can actually supply as a pointer to ah, to our uh huh. To DEA method that actually checks for the, uh, for the authentication. So basically going to say if context, that's our any context start can evaluate policy. And this is really pine If, um if Ellie if at local 10 Cason has ability to use a tidy or are these i d ah, and it's divides suggested check eso se device owner authentication. And this is basically using either biometric biometric our device past past court and, uh, then use goodbye, Mitchell. Basically just having the today the order for a city. So we're gonna select that one and just go about provide the odds error that created just a pointer. So if there's any hair wig and and actually is a pointer, so if there's any her, it's gonna get stored here. Excuse me. Now, if if this called, succeeds there again. Evaluate Thea this policy, then we're gonna call this policy so you can say context on evaluated policy. I'm gonna supply the same thing. Would biometric localized is a sissy message have, actually the title that's actually presented? Ah, and the Taleb, uh, like, you know, saying this is what is wrong. So you can say, like, other Asian unit for the app Chris Gamble. Okay, so that's what's gonna be and ah, this it doesn't size. It's succeeded or field hotels in the air. Yeah, so here we simply say his success. So we got successfully. If we have successfully authenticated these, we simply gonna say dispatch que that mean now Because all this happens, all the Bagram tied, you know, moved to Maine Tried before making any modifications to your wise on a sort of ago were doing was simply gonna print first, uh, clear. And then so done You dot Background color is equal to color Mistral, and they use hate, green color, etc. It is a It's all right. So, um, if this evaluation rails dummies else, he is a dispatch que made dot a sick and, uh, we simply cannot for us a year We're gonna set the view bacon color to be red circle little on Let's make it red. I think so. And next thing you can do it, Jack War Enter. Let air you go, Teoh. Uh, so evolutionary days in the evolution er as so get code. Okay, cause you gonna you gonna actually look for code and print something that's written from a local method that we're gonna create. Celeste was created. Method L A Air. Shh. This is going to receive an a record event and going to return history message. Good. So that's a call here. L a hair code, her message. Then again, supply. Enter dark coat in it. And, uh, we simply going Teoh scree it first. Hey, our message. An empty string and apply a such segment. And the search statements gonna be on air code. Okay, uh, now we're gonna evaluate certain certain errors here in this case, Mr That. So make some room at the bottom. You see what's going on? There's some standard errors that l a context, actually, our local syndication heh. Records that look a little indication, actually, trolls So being a check for those in and go return message appropriate to that. So case away there that help cancel that value. If that's the case, we can save message is equal to Otto's. Canceled by application. Okay. Case l a air dot Our segregation failed. Don't rob value. So if the authentication failed in that case, message would be user April to provide valid good in shows, and then you have invalid context. 70 context is invalid. Um, you can simply say just that. Then you can say pass code not to sack. So this is the the backup. So what happens is like, you know, when you're presented this allergy and if you failed three times, there's no passports set up, then, Ah, it's gonna screening is going to present to you with the past cold, and it's a passport is not set up. Just theater that Scott throw device. And, uh, system cancels system, gets a laissez while you're doing this phone call was received then Then you then just cancel the authentication so he can say other was canceled due to system. Even then you have touch I d locked out. So, um there, there clippings that actually that you're depreciated. I would still like Teoh captured because, like you, they're some iPhone eight. And, um I mean, uh, you may get you may get the situation. We're like, you know, using this so you can actually still got and do it. How would actually do it? Just because there's some situation is gonna handle that. So, to any failed attempts, it's another one touch I d not gonna rolled. So, uh, so this is, uh, navigated one. But I would like to handle that case. User cancel safe user cancels how you can just say I said go to you, sir. Sold. And then you have last ones just l Ienner dot user fall back. So does anybody get it's, um, basically the pass code. So it's gonna say user selected fall back and default is it should never reach here. Hey, it's OK. So, doctor on you. There we go. OK, so with that, we are ready to run. So just to recap here simply treating context, you're evaluating palsy. Whether device owner came up and gave stuff with biometrics, if it can that we're gonna mel with that policy and that policy is with the locals reason which is actually the message that's gonna be presented and then, uh, begin. Actually, we get success or for year, depending upon that, we can actually proceed. Okay, so let's go ahead and from this or someone run it on X s and his matter. So tell that. Oh, yeah, About your son. So All right. So Okay. Be forgot to actually, how? We definitely need a view controller. And this week until her used to be in the show. You and it needs day 19. You can tell her like so. So if we try to run this and, uh, you notice it's a seleka now show, uh, right here on day 19. And, uh, so they look, nothing happens. Uh, why is that? Because did we get to call? I think we've got to call her. No, I did how we never enrolled. Hey, thing. So let's make sure that they say the years enrolled. And, uh Okay, that's mother. And, uh, not day, Tony. Sorry. His day 19 that we actually chapter. So, uh, Okay. So that's actually what face? Ivy Youth. It's just come Finke eso basically on our own for b list. We need to actually make an entry that you wanna use. Users face ideas. Simply copy that string that's presented. And this is just a message. Teoh syndicate. He's her click. So okay, it Dan, he simply run it Day 19 and we go. Uh, yes. Thank you, sir. And there's a face I d die locus of me say matching face And there we go return green. And if I do it in, um, non magic face, it's a council had done, Fred. So that's that. And let me run it on. IPhone 8 to 4. Just er just to show you You know, that works. It looks hollow, but different. So there we go. I have iPhone eight open and, uh, every Go ahead and select 19. This case is gonna have touch i d. So it's presenting me touch I d and I already have to take the end road from Goma se matching to daily Justin's, which don't settle, do green. And if I go back to 19 say teddy is not matching on Cancel. It's going toe to read. Right. So this is it, huh? You guys enjoyed the student and I will see you guys in next video. Thank you. 20. Day20: alone. Welcome back to day, Tony Hand. Today we are going to be learning about her a little bit off you. I've you han emission by using your eye views. And you have you animations are transition and emission, and we're going to basically take a card and flip it to supply a flip animation. Do it. So let's get started. So what we're gonna do, basically, is, uh, we're gonna first going our story word and gonna have to re controller and basically had a wife. You on this? You have you How are you going to constrain it? Do a certain sides. So we're going to save it and height, maybe, um, 1 52 300. Right. So and we're gonna center it like that. Okay, so that looks tell Over, um, hideous. So you see, if I can do to 50 maybe to die is good. Okay, so that's so that's actually that's perfect. Now we need to do is in this you live. You were gonna add a couple of image views, but we're gonna do it on the from the code. Okay, So, uh, let's go ahead and create goto our You can't over and create Noblet. So I be outlet week are container were? You doesn't call this. Why have you And this is gonna be a connection. So let's go back here. Let's make sure this is actually any child. You and this has Day 20 and the class. And if you go on outlet Connect, continue to this view. I said so. This whole the work that we need to do, basically on the, uh, kidney on the starboard side. Now, let's go ahead and start putting couple off variables in place to first. We're gonna have and with you, So, you know, call it private. Let back image you. This is the one that we're gonna show on the back when the card is flipped. So you are which you are rich for you. How can we get any slide that right here you are. You read to you, um named Reach your image named. And actually we could have used you, major literal Stu picking your major trouble. And, uh, did you just pick somebody? So just pick, uh, this person right here and private it. Oh, front image of you. Do I image you? You. You You may chew and then image foods. Rich, literal. And so you each literal and just double click on it to open this one. Right? So there were two images. We need a flag that indicates, if reassuring, the backside of the card or the front side. So we're gonna stay showing wreck, Okay? And now we are going to basically gives a hunting mode and simply so front image you dot content mood is equal to dumped scale aspect of it back image that content moat, if you go to scale, has it Now we can add Hari miseries toe the container view So container we don't add sub you, um front image for you And until we don't had some for you back to you. Okay, um we also need Teoh set the translate Otto's reciting. So translate Are you re sizing mask to constraints and reason we do this we get of Unicenter on constrain and we don't want internal system to basically take artois izing and convert it into constraints. So that's why we can actually market false so we can actually can define our own constraints in the coat high and that we gonna do in a minute most were gonna start back in which you're done is hidden to be true. To be in a hide back image he silly. Now let's set some layouts. So we're going to is, uh we have to end this layout and its layout constraints Um, that activate that's strange equal to And, uh, I got back to it, and it's just sticks and right And we're gonna do you gonna set individual constraints her and imagery you dot leaving hanker dot constraints. You called to container for you. That leading anchor? Yeah, And next is trailing top and bottom. Okay, so we simply gonna say trailing trailing occur Top banker, top baker and bottom anchor. So this is what it's actually doing it up stationary Wait for you. And it's ah, it's basically covering the entire contender of you with that. So we're gonna do the same thing with the vacuum rich. So let me under this and Copy Dis are here, and I'm gonna pace it like that. Yes, it back. Henry to you. All right. So that way it's sexually covered for on the condition of your put back. It makes us up. All right. Now, um, we're going to do is we're going to apply it. Tap gesture. So you're a tap just to recognize er, And when tapped on the, uh, they continue of you were gonna flip the image. So defined selector and, uh, at out see funk. Ah, and this is going to be called clip hard and suddenly, you know, called us selector. Great. Okay, then we're gonna say contribute out ad gesture. Recognize her? Um, tap gesture that way. De print tap texture is registered with the I would give you. Okay. There's, uh, one more change and I want to. It's our JT container abuse. Thank you. Color to be clear. Color it. Ah. Defined some layer properties. So basically, we're gonna drop a shadow yellow color shadow, and we're going to turn our views color black. That looks like it's ah, it's shining. So container view that layer dot show shut off shadow. Opposite is equal to Dr Theo. Continue to review that layer taught shadow color. You go into your eye color. Are that yellow dot G cold? Yeah. Uh, okay. So reason I couldn't do that yelled fcd because this is a CD type property. If surgical or type property. If this was your eye color, then I could have done just, like, dark clear dot yellow and stuff begins. The type is already implied again. That interview want what? Every dot layer dot shadow radius heartbleed 20 container view dot layer dark shadow capacity to be one who wanted visible and container of you, not layer dark shadow path is equal to you, I bet here, bath and we're gonna press. Hiya, Pat. Basically used direct this one and we had a container of you dot Bounce draw a Benzia bat except the bounce and drop edgy bat around it. So it basically gonna draw the the shadow around the container contender. And this is how I taught you that background color is equal to Dark Black. All right, so est radio run it. None of my friends ate actually on. I saw I don't want X. Yes, I think that's actually care. Hopefully that is correct. And yes, that is correct. And then probably to do it's hard to that. Apply the flip animation. So sick. Look, everything answered. Working day 20 have a go and they go. You have this, um, glowing background. So you can actually give the radius maybe like about five, and start from there. Okay, So let's define the fifth generation as well. So that transition sites office, your professional know which transition side would apply. So whether it's gonna tradition from left are discovered tradition from right, so shall ization side illegal to showing back. So if he's showing back then you say you have you got adoration, hops him. It's that transition from left. If it's showing back then its transition protect otherwise is should show from right. OK, so that's our transition side site. Next thing, if showing back then Dalit so do not shrink back safe thing back its troops and turn it into false and then let transition options is equal to. And this is where we're gonna create some tradition absence, Sister, You argue that animation options and you say that to dot So basically, we're gonna first use transition side that we have to find here and that show hide tradition reviews that way is gonna hide and show directly. So you have you got condition and the one that we need is the one that has writ. Okay, so it is Ah, you know, which would continually so prevented. Saving Crittenden view duration is one point no. One point second and option ist transition options. So transition options an animation is what you're gonna say south dot front and make you dot um, is head is equal to self don't showing back. So whatever showing back its that's sort of what has changed our front view to and gonna copy this. Okay, so I hear every student applied to continue of you, and, uh, it's time we simply going to say on the back for you. Clear. So every run this right now. And if you tap on our card, that issue basically flip on the other type and show the other screen for the other image. Yeah, let's try it out. Day 20. Hey, if I tap Oh, we don't have the Beckham itch. What's going on? I started in the back. So this is the reason he should have added not to flip there, um flipped a, uh, hidden property. Our issue, because we're showing that flag so great, that's actually one. All right and reason we're seeing that big yellow thing because our images are not fully covering the screen. So far for this, it's to scale aspect. Pill scale has felt to fill the screen to fill the humane view completely instead of just ah, doing it like, you know, doing the aspect for it. And the perfect thing actually is like, you know, you take a plane card our card deck off guard and then apply from that back on that and can actually use that. So, hey, look. And one more property that we need to set is front. You taught clip to bounce it equal to true and back and back in review Dark clip to bounce . Is it true that way the older floor is not showing up. I just go ahead and rerun and check it out. So 20. Ah, there you have it. Tonight we go and turn our radios to be like five is gonna show up a little bit nicer. Uh, then just a border round. All right? It's a day, Connie. And there you go. So, yeah, glowing border around it. Right. So does it for today to get. And I hope you guys enjoyed to see. I'll see you got the next video. Thank you. 21. Day21: Hello and welcome back to date, anyone. And today we are going to be creating a u I collection of you. So Ah, you A collection is very similar to what you are. Table view is just read a little bit more flexibility on the lay outside, but you have to design everything. So we're going to take a look How, actually, we can build a very, very simple Ah, you I collection view in no time. So let's get started. All right. So I'm gonna add Hey, you controller. I have Day 21 storyboard open already, and, uh, I'm gonna actually give it the class and, uh, any feel you control her. Mark that. And, uh, that's about it for this one. And, uh, less drag out a collection. You so collection beauty. And you want to select this 2nd 1? Not the collection we consoler, but the collection with you. Okay, If you drag it out, you wanna pin it? Zero point from all sites is basically covering the entire screen. And you might wanna resize this a bit. Now this residing we can handle, um, in the code to bait basically show our content labored more properly, but here I want to do it. So have more real stato work with so boasting. First, while I have to still selected, I'm gonna give it eight reused identifier to be cell and, uh, has created a new file and, uh, that select cocoa touch So coquettish class and basically here gonna choose subclass off you. I collection Do you sell? And we're gonna call this day 21 7 so you can call it, like, you know, something more meaningful, uh, related to your AB. But this is what I'm gonna call, because this is more relevant to me. Um, so I didn t hear It's ever gonna have just gonna have one image view. And we're gonna drop this image for you right inside the cell, so make sure it is actually inside the cell, not outside. So when you see the hierarchy issued t cell an image of you under it. Okay, Now we connect. Constrain it to cover the entire screen and to sell basically, and there's a he's a constrained. So which constrain are missing? Trading? Leading top. Is this the bottom? So given a bottom strained us up, and the issue is gone. Right. So we got selected me to you bust like, the image of you. So, like, a sample image. So just select any image, um, And then make it aspect if it, um So I see Maybe maybe aspect fill his can actually work out better for our use case, but we'll leave it to aspect fit for now. Okay. So, uh, I think we need to do here is he used to go back to our you controller and create and, uh, cutlet. So the outlet is going to be called I be outlet week. Our collection view, my collection You? I think so. All right, Next thing possible. World comments. Um well, we are going to have data, and our data is going to be a and a rail. You are image. And he's like that and, uh, could create a function called Populate Populate Data hand were simply gonna for Luke into our images. So I know have 26 images that I had important. So I'm gonna use those 26 images and they depend and you say you are image named, and the format that I have for the image is image slash. I s o image video onto three celestic. Look, so have Okay, so this on its for some reason. Cheese to eight. Someone to say image. He made zero. That way we haven't made 0123 up to 26. Okay, so going to go back. And so that's what we have. Um and I'm gonna unwrap this so I can actually assign it to data he had taken before you forgot. Called us Self dot Populate Date down. All right, It's also give title. What? This one we've been forgetting, Teoh, provide a title for most of our examples. But you gonna do good job for this one. Also gonna set delegate just like table view to sell and data source. Do yourself that. So, So far, Uh, that is what we have. And, uh, in our decertify, these two, we can create an extension day 21 b and tell her And you I collection with you, delegate. That's what we need. We need you. I collection for you, Tera source. And we need one more that it's your collection for you delegate floor layout and this one we need because of you and actually control that with the night that we were talking about out for the cell and this is how we're actually going to control it. Now, before I go and populate this, I want to go back and make some one change here in this state. Tony. One cell. It's only creating opulent, um, image be you. I image of you and then go back to storyboard and connect these things before we forget. So let's give our cell a class. The class that we have created, they do anyone cell and then I say image of you and in a drag and drop it right on the top . So humidity is connected. Now next thing we need to do is teach selector, you controller and find collection view the outlet that we had created in Dragon. Drop it. So the collection is connected to the collection. We're on the story board. Awesome. So that is done now This finished just so we're going to say number off items. So in this case it's not. Number of arose because sell everything is item. It's not a role because it can be a role can be all you can be anything. So for that reason it's actually called number of items. And you're gonna refer and expats that item instead off index bad dot ro to access data and going do it in a minutes less return data that count, um, for number off items in section and for sale or item at a next bath not for not sell for Rohit and expat. That's the difference between collection being, huh? And they will be So you can say let's sell is equal to you I collection You are sorry, not your collection. We were say collection you dot de que with reuse identifier that we have to find that cell and index bath s So we're gonna dick you the cell as Day 21 cell, the cell class that he just created a minute ago and you undertone cell. Okay, now for cell dot image, view that image weaken Stoute state up in select data. We're going to index pat. And, like we were doing in a table of you wrote this time, we're gonna do item. Okay, so this is how we're going to get access to, um, image at that index. All right, um, now there's one more property that we need to reach should handle. But let me run this code before that show you why you gonna handle that one size property? So if be washed the app and go to day 21 and if you notice it's actually looking fine. But we have this space now. I don't want to space like, you know, I don't need I think, like, you know, you could do a better job without that space. Also, there are three rules showing up. But what if you want to show four roads or like to Rose is gonna come. We're gonna cover licking our entire screen with this thing. So how can you control all those so well that we can actually use one D function? That's one to miss it. That's to find under you delegate float layout. And that one is called size for item had index path. And we can say let item size is equal to collection for you. That bounce of unit get collection, use bounce. Gonna do pit of math here and get its with and divide by four. For example, some initial four rolls and we were we gonna return CT size with within height to be item size, and I don't size. So let's run this and see what has changed. Okay, let's go to day 21. And if you notice now, much has change. So why is that? Well, if you go to your day 21 and if you selected you controller, you notice that we have minimum spacing. And that's something that might be causing this to have that spacing at uneven spacing in the middle. I say, look, and there we go. So we have four rolls now. Four rules are to four cells. Sparrow. It's too small for May. So I'm gonna actually change it to three. And one of the other reason I'm changing it to through because it's actually how even the a shown at the bottom. So if you notice this is actually first of all, this is do it. And then all the images are actually showing up just perfectly. All right. So, like, you know, the last row does not have, like, you know, funerals. But, like, you know, even number of like three. So it's covering the entire and tired bro. So that is the the collection view that that you're going to create and take a look. How cool this looks like, you know, as to edge, and you can actually control the number of rows are number of items. You're not display in the in a row just by controlling this one line property? All right, so I hope you guys enjoyed this video and Ah ha! See you guys in the next video. Thank you. 22. Day22 part 1: No, no. Come back to day, Tony. To and in today's video how we are going to be looking at local notifications are sort of local push notifications. So that's get started. Have Day 22 storyboard. How which is nothing right now Quickly opened here. So let's add Have you control over and what we don't do here. It's, you know, had a button, and, uh, I'm gonna center this button so essentially what we're gonna do And that says basically, on the clicking on this button, we are going to schedule a notification that we're gonna show, uh, with time or so, Like you know, after two seconds are the notification is gonna show up. Usually used us for, like, you know, scheduling something or like you know, you wanna You have poor example. You have a calendar up in. You want to let higher users know and some sort off even happens like you know something. Time it's triggered that was scheduled by the user at that calendar date our time. Then you can actually show them Hey Ah, local modification. So that's what that's what we can actually show. So show no t vacation are basically schedule. Notification is the proper word in here. All right, so let's give this a district controller class. So Day 22 it is an initial you controller. And, uh, then, huh? We're gonna go here and create at I B action this time. Funk hearted, not vacation. Sander is you. I button and let's go ahead and connect us to our storyboard. So did that notifications click on that touch up inside? That we go high, I think means you in order to work with local notification, we need to import from user notifications. Okay, Now, um, trusting you need to do is when you did appear in a show, Um, I mean, US uses permission to show the notification is exact. Same screen. It's like, you know, showing the the push notification. Basically. So we're gonna try to request that. So let's do that. So we're gonna create Ah, let center is equal to U. N. User Notification center. Dark current. She didn't get the current instance off. He's a notification center, but then he was a center That request authorization. Okay. And, uh, Ultraman, a request authorization for is U. N. Is a notification dot alert. Ah, notification. Um, option is actually what we need. No u n u n notification options. Hi. I don't know, integration authorization because we need organization to show alert, sound and batch. Okay. Uh, next to her, how we gonna get success? Basically our hair. Okay, so here, you might want to, like, you know, do. And it's a successful, like, you know, and use that declined it or anything like that. One wanna what? Are taken action to it, but for our purposes havinga leave it just blank. So because we just simply gonna show there has to to use their. So if I run this right now, I was gonna happen this click on day 22 it's gonna show us this organization, um, dialogue. So take a look. The Ron, the ap. And so, like, day 22. There you go. So verification include alert sound, and I cant badges to the things that were actually specified, and the skin picker could be configured in setting, so we're gonna click allow. Okay, so now what we need to do, I think I'm gonna actually show you. And, uh, I found, plus because ah, hitting home screen on iPhone Plus is better. It is easier for and simulate then on iPhone now xx excess height while is launching lists . Continue. Um, so in our schedule notification, no matter what you do, it's gonna create center 1st 1 more time and you end user notification. Hi. Oh, I think Exporters catching up, user No T vacation center. That would go dot current. I think it's being slow because it's actually trying to launch that new, um, simulator said that current is, though, that we want Let me let me see. I have, like, way too many, uh, way too many. Similar to soap. Which one is this one? I say hi. Hi. Can I can actually I upon eight. So I can actually close this? I don't need to worry about that one, so I can click. OK, and I can say I need on I Pawn eight police. Come on, X code have a That's stupid. Okay. Hi, Finite. So this it happens like you know quite often when you actually try to say tell something, Teoh he actually tried launch a similar and kill it in the middle Exco just goes nuts about it and doesn't respond. Probably stuff. Anyways, let's continue. So we're gonna create a very well call content and there's going to be U N mutable New table notification content. How many say that? Gonna give content a title and ah, decide that this is going to be announcement for my new course. So new course announcement and, uh, contender subtitle. It's going to be 30 days off. I always call that the name and content. No body is equal to learn i. O s fall in 30 days, for example. Okay. And, uh, then can have content you can define sound is all. So you say sound we need u N notification sound dot default. Okay, um then basically, what we knew is a trigger. So let trigger it's equal to U N time. Interval notification trigger has only want. And you wanted diamond the world with two seconds off delay, and we don't want it to reads. This is how our notification is going to get triggered and say, let request Michael, do you n notification, uh, request. And, uh, the identifier is something that we can create our own content, for example, like fire. And, uh, this is content that we have created and Sigur that created. Okay, uh, now all we need to do is we need to say, center got add request and the completion. Hendler is hair. Hey, credos there. So if air is not equal to know, you wanna print the air, doctor, look wise description. So let's run it right now. And basically, what what's gonna happen is essentially the tap on the button and hit the home screen. Ah, be going to see and notification bopping up. So and, uh, messing after that can handle. So let's find they don't need to. And we say allow and schedule notification. And if he had home in two seconds, we should have a, uh, modification being parked. All right. Eso it didn't scaler. There you go. We got a little bit late, and we say, okay. And, uh, then go. Her notification just disappeared. All right, so, um, that is that is the replication part. Now, let's, uh let's continue in the next video about, like, you know, showing notification within the app and also setting some more configuration items. Thanks for watching. I'll see you guys in next video. 23. Day22 part2: alone. Welcome back. And in the last video, if you remember what we did basically is on day 22 we added, Hey, pressure a person integration in local recertification. Ah, into our coat. And, uh, if you select day 22 in scale personification hit home button, you can hear basically a sound. And the notification is gonna be here, and you can actually see the description like the happening description, and he can actually dismiss that. Okay, so today, are we gonna cutting me from here? So one thing you might have noticed that every single time you actually press the button, you have to go back to the home page, our home screen. Now that's that. That's normal behavior. I mean, usually you don't see notifications when you have the app open and there are a total is a But if you still want open, it lets the user Is that a certain magic? You wanna show them an update? A at a different page than you can actually show them a push notification within the within the app when the APP is in the foreground. And for that others, there's one bit extra thing that you need to do. So let's do that. So I'm gonna create make station here. Day 22 controller. And, uh, this is this is going Teoh be inheriting from U N user notification center delegate, and this led it actually takes a basically imprints students. And for that toe work, first of all, we need to make sure that our center is ah, delicate center of delegate itself. So self is the delegate for center for the qualification center. Okay, the next thing you need to do is you need to say how when will present. So basically on the notification will present you would actually call a completion handler . And you in a supply A complete in handler with, um, view of the U. N. Notification presentation options and presentation options are are you can exit without you in notification presentation options start alert and dot uh, batch hand that sound. So you're alert shoulder show badge and he also wanna play some. All right, so that's that's one thing in the other arm that he actually, uh, wanna show it are implement. It did receive, uh, did Chrissy and ah, this one is actually, uh, just gonna call the completion enter When the notification received, I should actually part that Okay, so if I commanded and run this it could happen. Is we no longer have to leave the app to see the notification? We can see it within the APP right there. Okay, so that's, uh that's that's home sting. Now, let's say if you wanted to add hey at an image like, you know, to show high an image inside this thing notification, you can do that too. Um, s o the way you do it is basically, you create an attachment, and you, you and that vestment into your, um And here are content. So for that, let me bring an image into the project. Hold on one second. You know, being in image so split right here. And right, So we have the image. How would we need to do? Is, um we simply need to take the take account, so read it. Let image is equal to you. Our image. Um, I think we need to create in moral, because you in Okay, list, right? So image banner is equal to try, uh, you in notification attachment. So there's unidentified air and you can say this isn't fired, Mitch Banner and the you are let its accepted. Except so we could say that. How can you just tell home you are and build a euro by saying bundle dot um, main dot You are. And for resource, the resource that we have that you're talking here, it's I rest all the maize. Name and extension is gpt like so Okay, options. We are supplying the stuff so we could say said empty. And, uh, that, uh, is going to resolve and give us an attachment. African just attach. So it seems there's in here. Yes, it won't drop this. And, uh, you are all is four. Okay, the string girl. But actually, we need so Okay. Uh oh, I have Why. Okay, um so so this actually Bilson e build. So you are also Why do we need this? That's my bed. Okay. Yeah, I would say Yeah, and rapid because we know it already exists. Okay, so you need this. And after, Like, you're seeing, uh, debugging first and like, you know, reading through the air in trying to resolve that. So let's see, Day 22 and schedule notification and Daddy guys. And if you pulls down, you see the full image showing up there. All right, So, uh, let's get now There's a one bit of piece that I want to add assault So you can. Other than this, he can also add Ah, buttons, actually. So I'm going to show you adding one button, but you can add as many buttons you want eso celeste any button. So me but he reached banner. Okay. And button. Okay, so let's say add dismissed button, and you say you in ratification action, okay? And the action takes a identify and identify its dismiss. And, uh, the title is dismiss And, uh, options are simply no. And then how what we do? What we do is, um, we actually have to associate this action with a category. So we say cat here quantification category is equal to U. N notification category and the identifier. It's common cat. Hey, gory category, con category. And the actions are actions that we have defined. So dismiss, um now, intent identify. We don't care about those. Ah, hidden preview body placeholder, are you? I don't have any. So just say nothing and options are nothing. Okay? And then, um, once you're done with that, we can simply say content offside center. Thats is associate to the notification center center dot Ah, set notification category and we say notification category. Oh, disaster being array. Because this is a set. So All right, so it's the day 22 and get you and they go. All right, so button still not showing up. I see what's going on. Um, so in our truc response Oh, but it so seaward had dead attention up a request center dot head request. So, um, you're sending the, uh, category here, and, uh, we need to do is, uh, also weaken, I say. So. This is where you actually see the response. So that's see extra settings. Okay, that's not what we need. We need t be able to see a button at the bottom bottom. Right here. So, um, basically, uh, see if here getting any wrist bones, uh dot Yeah. Okay. Lets try Teoh build us, because what we need to do this, uh, you'd be need to be able to, uh, get some sort of response her when we actually showed out. But see, the option is not even showing up to the sand. Um, default action. So the default action, his being triggered and, uh, could it Okay, uh, this he's got a good name. Can agree. I did. Maybe that could give us a clue. No. Put. Okay, so let me do this. Let me try to debunk this, and I will post you a solution. Uh, indeed. Except you. Okay, So you don't wash me, like, you know, researching all that. So it would do a respective research on, uh, I'll be right back with you. Thanks. 24. Day22 part 3: Hello and welcome back. And, uh, So I finally figured out, like, you know what? This, Um and, uh, it's actually the association between the center and the content. So says you're actually creating this category here. Notification category. I just hope that island fire in place. And, uh, so our center knows that there's a category like that, but content does? No. There's a category like that. So we simply need to set this property in place. So we need to say, contend that category identify. And that needs to be exactly same as the notification category that we're associating with the center so knows about it. So would that change? You can actually try to run it again. And, uh, we're gonna notice. That's how we're gonna have a lice. I really nice, uh, dismiss button showing up so scathing notification. And if I pull down and then we have water, dismiss button. And if we click on dismissed notice here, we're gonna actually print the message that we know that this is the action hot. That was actually that actually played. So uh huh. So you can do is like a beacon. Create some sort of statement on the action identifiers. If you have a whole bunch of buttons and know which button user clicked, and depending upon those, you can take certain actions like name Katie's or to certain screens or locked those events and stuff like that. Right? Hope you found this video useful on. Uh uh, I'll see you guys in next. Really? Thank you. 25. Day23: Hello and welcome back to day 23. Um, And today we are going to be learning about couple of things. So we're gonna learn about ah dcd silicon. A leverage on the background cues, Teoh process and image. And we also gonna learn about core image filters. So called image filters are basically, uh, these image processing components How within IOS that you can use her to change your images to a number off different ways. And, uh, for today's demo we're going to be using ah safety atone. Eso se p e se fia Howard. You wanna pronounce it? It's a C. I s a pia tone that actually turns things into vintage like, you know, images in tow. We went age. How brown kind of shade. Are you gonna see what I'm talking about? So let's go ahead and get started. I'm gonna open the object library and gonna drag out a you controller right here. And, uh, gonna make this you control right? And you showed control must fall. And gonna a sign the B control class to day 23. Not expecting Next thing we need is a, uh oh. Is an image of you so, sir. Sorry. Not a new project. Wrong combination. Command shift. L is the one that I want it image for you. And we gonna take an image of you and driving out here, and we're gonna size it almost like that. That would go. And I want to keep this height. Um, and I wanna keep leading and trailing and maybe, um, the top as well. Hand and constrained this. Like So, um, now, well, we have image the selected list. Select an image somewhere to IOS draw one beginning. That looks great. We gonna select clip to bounce in case if it's actually gonna overflow and they got that looks good. And I'm gonna hope in the article every one more time in kind of trying out a butter, and this button is going to replace right here. Okay. You know, call this button profits image. And this is what we're gonna use to process the image. So click on it and process to apply a apply a certain kind of filter and processes image to turn it, Do something else. Okay. Very different looking image. You're gonna see what I'm talking about, but has said it do 10 from the top and, uh, less Align it How, exactly? That again. And we are done for the storyboard s. So I'm gonna go back to you are be controller and I'm gonna create a couple things. First I be out weak. You are You inch view You are image bju and then can have I be action bunk And that is going to be process. God did dap process image center you I But there we go, all right, And ah has connect this before we move forward. So selectively controller, go to our clip connection and connect you make you and gonna connect to you receiving actions to the button on touch up inside that Saudi woman toe getting that began so I spelled and make sure there's no air like the way it's showing it right now, I looks like Bill succeeded, so I think we're set, so all we're going to go. First of all, I want to show you that how images can be processed using applying the filter. Then I wanna also show you how those are images which possibly can block a thread. So this is a good example, and this is a good point to talk about something, some things to do on the background, thread and things when they're done hoping them Teoh like domain threat. But before that, let's give it a title. See, I kilter and end GCT TCD. That's what we're talking about today. So, uh, possible What happens is how why do we need the city first and foremost. So let's say when you're actually interacting with your user, for example, while user is interacting with this form right here. If I run this right now and tap on the process image and imagine it does some really heavy lifting and it takes about 10 seconds to get the response back. Now, now, that's what I have this sleep. Ah, here, for it's just gonna basically pretend that we have some work going on for 10 seconds and then he's gonna come back and resume the processing. Now what happens is if our tapped ISS, but what's what happens? The whole U I is actually froze and he can't really do much, and the button is not highlighted for next 10 seconds, and then the actions take place. So let me show you one more time So, um, 10 seconds in the 10 seconds 1/10 2nd it's gonna be passed. Then the image of a button is gonna re neighbor. Now, that's not a nice thing, because you're you. I is a block on either. Can't really do much during that time when you're actually processing something which is a bad practice in a lot of time. Thea the Iris platform herself. Well, basically, ding you by killing your app is if the wait is too long. And now if you do a lot of, uh, like, you know, a lot of far right, Bagger process a lot off data processing on the on the main thread. Uh, sometime compiler can complain as all Okay, so what can we do? So the recommendation is that anything that has to do with long running tests, you should move them into a background threat. And this is how you do it. So we're gonna create apply Finster, uh, function and this powerful to right now, it's not gonna take anything. It's simply gonna call to sleep. Okay, But, oh, the way we're gonna call sleep this time, it's going to be a little bit different. So we're gonna say Dispatch que that global. That's one of the pre defined que background cues. And you can provided they think of this gold right there and you can actually make that escape. Okay, Don't apply photo. So, um, look at what happens when I actually run this code, Are you? I is gonna be interactive thean tire time when the processing is going on, So what? It comes back immediately and I can click on back, and it's actually it's actually just working fine was gonna happen after 10 seconds. The the trended that those sleep, it's just gonna go resume working is Taschen. And, uh, you would never know what results we're gonna receive because we never placed any hooks to receive that result back. So with those pointers in mind, let's build the C I filter effect s so I can show you how this can be applied in real life . Okay, So in real projects, maybe what we need to do is we need to create in, uh, create a CIA image hunt off you image that we have in the image you So we can say that image is equal to see I images and we are going to say that we need to get the I imagine using seedy image vote, and we simply don't just take it out. And here it's a image for you. That image, that city image. Okay, so I'm gonna foursome rap qualities because I know that is an image and that can be converted to hacia ti Mitch. And then what we need to do is how really to call dispatch. So we can. So you have two options you can call dispatch, dispatch global que right here. Or you can call it within this function. So, scholar, within this function, because that way we can actually wrap everything inside one function. So, uh, this we're gonna modify this function, we're going to say it takes an image as parameter see Mitch on. We're going to supply the S T. I image actually. Right here. Yeah. Now, um, inside this filter apply filter out. Going to leave this 10 seconds, maybe, like, 25 seconds. Uh, and just to, you know, add some delay because Cornish filters are again really, really fast. And I'll show you like by doing the asleep. How fast they're so but less cutting So let filter civilian festival theatre filter. See, I filter and this takes to think so This takes up filter with name, uh, and some additional parameters. So we're gonna go with the one that had that distinctive names and the name you can find out through documentation, but have already looked this on up. It's called See, I cor in which sepia don't. So if I go inside here, um, so you can actually he can actually open the developer documentation, and it's going to show you where the like. You know, I'll also things that that you need to know, And, uh, it's also going to show you CIA image voters, let me pull it up for you and show you. All right, so So you have, like, you know, thesis cultist is or stay P looks like And, uh, there is a, uh, high court made little reference his DEA It's a key. OK, so these are all the posters, and this is what I got the name from, So our stay Peotone is little f savior. Very good. See, I say Peotone and they have really nice example that it takes it takes couple off. Ah, a couple of values. Like they takes input it takes there and put our intensity, which is, like, you know, theater Butte. Like how in test you on disputed to be, And then you can actually apply that. So they have, like, a really nice example. And they have, like, certain mother effects that you can actually apply. So this is more so more baker way Big net. You have Ignat and a big net effect so you can explore these again. It's called core image Filter Reference streak, and you can look it up. Um, yeah, back to our backdoor code. Eso you have hacia si se pudo and, uh, was you have the stay Peotone I don't set. How then are used to do is he dio apply the options so we can say that said default So fussed like set all the defaults Did he say filter dot You made set with you? Um and you could say image that we have received. And, uh, c k c high input image key is the key that you won't actually said it. Now this is gonna use Apply the default value off the intensities. I'm not going to change it, but he gets simply, like supply. So let's say conduce like set value 0.5 k. C. I input, uh, input and density key, and you can actually define intensity. Okay, so 0.52 e 05 So I'm gonna comment this right here. We're gonna apply. We're gonna use the default default setting for that. So now, was he Once you have that are you need to do is created context. A context context. See, I context with options as nail, so we don't have any options. And we just want to create that. And we're gonna create image reference out of that, sir, context dot create CT image from, uh, the images accepted. Filter that output image, and we're gonna say image don't extent that that's going to give us the direct within which eyes can actually fill whatever it has received from the output. So it's gonna create a city image, that and now what you need to do is basically yeah. Now, this is the point where you have done all this work in the background right now, you wanna more yourself in the, uh, on the main threat in our to update. And you I and remember, this is the key. Whenever you're doing anything update anything that has to do with visual come, he's a component. Then he should move yourself into the main main cue. So you can simply do that by calling dispatch que that main dot e think and you can say self taught image you dot image is equal to you. I image. And you my image has an overload that they city image and he can say can supply image reference into it and should be done. So if I run it right now ah, you're gonna notice that after five seconds it's gonna apply the CPS reason or science seconds because we're gonna We have put a sleep for five seconds, but I want to show you, like, you know, despite having that sleep are thread is our button is gonna enable, like, you know immediately are telling us that Hey, it's it's actually still responsive. So when we click on that and we got Thea Responsiveness back and after five seconds to humanity is gonna turn into sapi Ato like OK, so that was the example to show you like, you know, that if there was a delay, Things happen after some time. But you're you. I doesn't have to be block, but let me show you how fast the C I filters are. So, uh, basically what happens is s a media click on it. They just get on it and start working. And within, I guess, Like I've once measured handing performances, I was almost in microseconds. So it takes the image and within microseconds that actually just turns it into something new. And, uh, on, uh, like this Is this a big image, like with a lot off color? Make sure sunshades and everything. And he was still able to do this, like, in a fraction of a second. So Ah, they are really, really fast. Right? So this was Ah, today's video. Um, basically just wanted to show you like house. Yeah, filter works and how gc d actually work. And how in leverage E c d do offload a lot of that heavy lifting that you do ah into a background thread and then received the results on the main tread when they're done. So hopefully Hans, you'll find this useful. And Kabul Seaga's and next video. Thank you 26. Day24: I don't Welcome back to day 24 today we are going to be learning about creating extensions to basically the code that we don't have really serves God for, but still be able to extend their functionality. And we can actually create and, uh, asynchronous ah, downloader for the UAE image from the internet. So, as you already know, or you might already know that you I'm a should not have a way to download image from the internet so we can actually provide that functionality. And we also gonna learn how the U R L session works to basically how Thea downloading from the Internet works in this. Okay, so let's get started. I'm gonna go to Day 14 storyboard gonna create, uh, be controller and, uh, also gonna create an image. You just gonna front that in here, and, uh, we're basically gonna make it cover the entire screen because that's the only thing that gonna have here and, uh, gonna use aspect Film. Uh, are aspect fit basically, but that have a cold. Now we're gonna make sure that is initial. We had ah, the day classes. Day 24. We controlled her and, uh then going to come back here and you know Regan Dolar create not lit. Be outlet week Far image for you. You are image for you. And then, um basically on butin appear we're gonna start making and it recalls So have you made load Enbridge here? Okay, so let's go back into the u I am age plus extension darts file and there's not a year. So start reading some coat, so I'm gonna write extension to see how you extend from shells D for any class that you think off. Hey, ever. Then I was saying you could say, uh, this time you need you. Like how? Because we are working with your image and, uh, we simply create a static on function, which is going to be called download or image A think. Okay. Ah, this is gonna have two parameters. One is going to be oral string thean point from therapy Need to download this image and a completion handler, which is going to be off escaping type and, uh, is going to have is going to return in the Copa. Can you image how, with wide tape? Overturn so nor determine time. And that's your eye image. Here's nail Ever. So we can we will return nil in certain cases. So let's first construct you are using curole string overload having a pass. You are strength into that and unwrap this. Okay, next thing Ah, this is how you make network calls in High west. You say he used Ural session and, uh, if is shared session, which is like a singleton that's already created that sets some of the basic things, like, you know, accept cookies and stuff like that cashing and stuff like that for you. So use used, shared instance and he say data task. And the one that we're interested in has to do with Ah, that takes the girl and have a completion handler. So he had to return here and provide the girl that we have actually chosen and highlight completion handler and hit enter so we can have data response and enter types, um, to find here. So, you know, first check if there's any air, so yeah, he gets a guard in our It's a cool two mil else. Error is not now. You're gonna say completion, Neil, and we're gonna return from here. You do another guard, and this is gonna be guard. Let data is a goal to data. So we're just gonna unwrap data. All these values that we're receiving here are optional. So we're just gonna say if data can be unwrapped, then undrafted. Otherwise return as a wise but a nil on completion and returned from here. And now we can actually simply use this data. So you I image has an extension goal. Our overlord overlord that takes data can say data in supply data. And this is gonna give us an image back if it can. Um, and then we're gonna supply that in our completion block, like so Okay, but that everything should be set. And this all the code. Now, don't forget to call resume on your your session data test, because otherwise it's not gonna start executing this piece of code, so make sure you call resume. That's the most common error that we forget. Actually, so Excellent. Make sure you have, like, resume at the end. That should be all set. So we're going to hear is simply we gonna call you. Say you I Mitch and the city beauty of extension. So if you type you are image right here and hit dot Your method is going to show up along with everything else that I have a suspect related so in which they think that we go and you hit for turn for this case, I want to download a, uh, download an image from the movie, get obvious endpoint off. We call Harry Potter, and, uh and he is that, uh, I think this is the first high Potter movie. Uh, and that's a reference to that. So it's kind of basically download from that euro endpoint that image and going to supply it and basically gonna show inside the image you. Now you're a session creates a new thread and of a background trend. And so he means that there's returned to us is still on the background. So you wanna make sure that we actually move ourself into the main cue? So dispatched que that main that I think And we say, self doubt, image, view that image, it's equal. Do image like so Okay, let's make sure you could drown in a sea initially controller, everything is said and let's go ahead and take it to a spin has given a table. So contention plus net war Brooking. Okay, so I hope one thing that I think we forgot is too connect outlet the left, make sure which we use connected and, uh okay, as soon. Otherwise it would have crashed. Seven. Let's go to day 14. Start No. 24 not 40. And that we go. He had a little bit weight gets our image was still downloading and when they may just downloaded and actually showed up. And if you look at it, the next time in this download is super fast because it's been cashed in our inner on our phone or in this case and the simulator because ah, you I image extension. You says his chance session, which already implements the cashing mechanism. Alright, so I hope you guys, huh? Enteritis video and I'll see you guys in the next video. Thank you. 27. Day25 Part 1: to date 25 let's get started. So today we're going to be talking about core locations. So we're gonna be talking about accessing your location Information using location, code, location, framework. Okay, so let's get started. I have ah, Daytona five storyboard opened and be controller. It's created. And what I've done actually is I'm going ahead and and connected that t to the, uh, class and made it any shall be controller. So arrest helping else's now, bean guessers actually just just created. So let's get started. Has been a first saying nobody in something important court location. That's, uh, that's the most important thing you need in order to work with location services. Okay, Now, on our storyboard, we need a label that that sort of gonna use to show our locations are gonna say, label and trap it somewhere right here. And then they make it 20 points from each site and go center it Hudson plea and container. And, uh, I guess, uh, logically in container. So testy. Yeah. Okay. And how will make sure that well, among the lines and we change our fund to be having in next and l ever bear um, my real 18 points. There we go. So that is hes get make sure the colors dark gray. Okay, uh, creator, an applet that would be out last week. Where? Location legal. You are a label. And before you forget was connect that to this guy where One more thing I will do actually on the center line, this text. So that's like the label him center align it that we would ever be show actually shows up in the center, So Okay, so, um, I think you do. Yes. We're gonna create a location manager. And since how you manage your location sexy l relation writer unwrapped. So we can actually just initialize it. Um, right away. So the location manager is equal to see a location manager. In this letter, that location manager dot delegate is equal to sell. So came here about the changes and get the notifications about the changes in the location . And I was going to complaint so we can say what simplicity. We just gonna put it here, See a location manager delegate that Yeah, uh, we can set a desired accuracy. So basically, this is to deter mined like, you know, how accurate you want the location B and B want absolute accurate, absolutely accurate. So we're gonna say, see licorice accuracy best. Okay, then we're going to say questions are location manager Dr. Request always authorization. So this is gonna basically President Adela box, which is going to say that you should always. And the app is always gonna use app. It's going to use tiuna questions ever since. Oh, if it goes to the background and the u in In that case, it's gonna used, uh, Well, if you want a different type, like when in use to study in the state request wearing, you're not relation. That means when APP is in youth at that time, it's actually requesting the location services, and we're gonna start updating location. Okay, um, but first actually listed this. Um, so we're here. We're gonna request for the authorization. Uh, yeah. And start up to the location he's gonna gonna ask us listlessly would display. I was thinking a little bit ahead, but I guess we'll cross that bridge when we get there. So, Press, Inc. If location of great veil so did fail with their you're gonna show something. So we can say itself that location, so dot Location, label doc, text is equal to, um air. Okay, location. So we're getting location, and we can actually get the years localized discussion, Mr. Yeah. Okay. Great. That. So you know what's going on? Second thing, how they're gonna say did update locations. So that is how you actually find the New York dates on the location. So what you need to do is first reversed. You gold. How locations you get her are basically the coordinates and you on actually convert those corners in tow. Something called place marks on that he can actually, really in terms of streets, like city and state and stuff like that. So location gives you are coordinates on. We're gonna use those coordinates to briskly converted into an address. So speaks we can say C l, uh, geo corner. He slides it, duck worse. And, uh, basically this How are we gonna provide location? So, uh, location, take managers applications. So major location and, uh, you know, unwrap that rally and what We're going to receive it. Basically Couple of things, we're gonna receive place marks. We're also going to receive her. Okay, so, uh, and then here, this is they can actually unwrap our our code. Okay, so in the next video, what we're gonna do is we're gonna fulfill on and unwrap this. Ah, this place marks right? 28. Day25 Part 2: Hello and welcome back. So, uh, we're going to continue our unwrapping off the place marks addict. We have received nothing going to do if you're gonna just check if the error, it's ah not equal to know. Okay, in that case to have over here, or you should check if, uh oh, yeah, if the air is not equal to nil. So if the error is not known, that means to be encountered matter and begin. Simply do this. I can't say that. Like, you know, that there's an air and we triple that and we can return from here. Okay. Are very yet, actually, you can, uh, simply se guard. Let guard you h equal PICO. Now else we do this. All right, Cool. So next thing, if place marks that we have received, So place marks that he received out count is greater than greater than zero. That means we have received some sort of address, and we're gonna say that PM the place Mark o r. Place Mark. It's equal to place marks CEO. Okay. And, uh, we can actually unwrap this, and you're gonna drop this off. Now we can do Is, uh, from here out. We can do a couple of things herself. Us. Well, we can extract Thea the locality in the postal code, um, and country and stuff and basically show that and, uh, trusting me to do is to stop the update. So bookish manager updates sns it guests and new, um, new location updates. So we don't want to keep receiving it because we're actually using best security. And for battery performance is actually best to use to use D. Uh, I mean, to stop like updates. What? We don't need it having. We just need, like, location once. So we're just gonna stop the update. But I think we're working with a map sort of app. Then you can actually keep getting these updates. Okay, So first thing we're gonna get after that is locality, and, uh, you can I say, uh, place, mark dot locality. And, uh, if the locality is a eyes mill, then you can simply have ah, blank strength. Go there. Then you can have, um, let well still coat. So, um so place market. Lee returns postal code are not sick. Or which is like, you know, it is a references of corporate calls it a po. So called doesn't matter where you are recorded. US starter Main post core is much more widely used. Ah, so that's why it has postal code. Understood there. So don't get confused home. And you, uh, see, there is There is a code. It's just called also gold admin area place mark dot Mr very, uh, And, uh, so basically, designate, as, like, every state, every is, like state or something. So, like like, the temple says it will be making a string C a r California or something like that and country So, uh, place more, that country. Yeah, nothing. That plank. And what we're gonna do is I'm gonna update our label location, people, that text read all this information. So you're gonna say no show locality. Russia was so cold. My show had mean area and show country. Okay, let's try to build it. And, uh, you should have bill successfully. And if we can't find a place marks right. In that case, we are tell a location. Legal to print. Um, as though place mark date. How all right that this game has been. I'm pretty sure. I think, uh, I'm sure there's Ah, there is a saying that we are We're my saying, probably. I think it's, Ah, his boldly the P list. But But let's let's find out. Get this information needs to be used to be added. So he get in there and that's gonna tell you what the P list is. Everything. That's what you need. E needed that strength. Um, OK, so how is that really news? Um, it's add that and needier location I started with Let's go ahead and go toe 25. Take on fire and we are saying one more. So we have always and when. And we need a news, he said. Descriptions are so let's add, died one, maybe our location and start running again. It's B list. Our entries are really hard to find, so it's actually her doof. Look at the error and say, OK, so this Tudela. But you're going to see and you can say like you know I won't allow. Always allow, and location could not be determined because location services not enabled. So you're gonna in neighborhood for San Francisco and there you go are locations updated and we have printing San Francisco's location. So that's that's what it for this year and, uh, takes in 40. I'll see he gets in next year 29. Day26: Hello. No comeback, Teoh Day 26. And today how we are going to be looking at, Ah, a new way off parsing Jason. Basically your incredible protocol. And basically what we're gonna do is we're gonna connect to the Internet and going to download some the movie data and gonna parse it using quotable Jason decode IPO and basically decode herbal and incredible incredible particles. So, uh, we going to see, like, you know, one of the things to keep in mind and how to download data from the Internet and actually show it inside. Eight people. Are you OK? So let's get started. Um, what we're gonna do is have storyboard here, which is empty. So gonna creatively, controller, and, uh, drop it right here. Make sure any feel, and we have day 26 few controller connected to it. We're gonna drop e table, uh, you into this. And the stable view is, uh, going to be been down from all sites. Okay, um, then get a drop a cell. And this time we're gonna design a custom cell. And what we wanna basically show or user is, uh, the title off the movie and ah, a little bit off overview, Basically what that movie is about, Um now I guess a 21 point I'll be created in an image for you. Yeah, you are imagery extension to download image a synchronously. So if you have time, we can actually leveraged that of also are let's go ahead and do it. So I'm gonna drop an image of you, Um, right here and, uh, just make it, but 100 by 100 uh, and then it from 10 point from the beginning and, uh, center and article e container. So I think 100 this a little bit more. Uh, I asked that should be okay. I see. Strike it down. Over. But Okay, so, um, I guess so I could What can we do? We can make it. Oh, all right. So let's make it 50. 50. Um, I want to show it, like, you know, really small. And let's remove ah, lying toe. Why? And let's spin it at the top. Eso we're gonna Bennett, um, at the top. So 10 points from the top. All right, so it's gonna be ah, shown right here. Let's make sure we have aspect fit. And, um um movie movie posters on a little bit, Like no in the ass in a little bit dollar off fashion. So let's do it that way. So this increased height to be Sony? Uh, okay. I'll make it local a bit nicer. Hi. So, uh, we need a label. We type movie title excel and need another label. So copy that. I just option wreck in well, deep. And, uh, selectees to change is formed to be custom having there next and 2nd 1 We won't actually decrease the size to be 12 points. Don't make it zero line, so it can be multi line and less connected. So it should be checkpoint from top 10 points from leading Hampton point from trailing. And then this should be 10 from top 10 from leaving 10 from trailing intent from the bottom . Okay. And you see, you're going to see the center, so you simply select the constraining the bottom, constrain and edit it and make sure the constant is not equal to put career than and equal to that Ray is gonna resize according to the left of the text. Okay, so, uh, so with that, um, I guess begin, actually, should get down to this much. Okay? All right. That's that's just get so let's create a new file to hold a sells properties. So you are a table people. So where we sell? Okay, so in this, uh, yes, we need three idea outlets. I be out. No, my that I be out lit. They are weak. You are image. Be that So you are image Were you? And then I guess I'm typing fast and, uh, okay. At maybe outlet week are title her we title. Hi. Us. Your label at I b hot let week are will be description. You I label okay for these three now, um, you and I actually go back to our people. Children create an ocular for table years old. So at let week, are they Will you? You are They believe? Okay, now let's connect all these before we look forward, have a select you control her go to outlet connections and connecting with you bust select cell Give it the class that we create it and go to the outlets And basically say it is just imagine more We description is this one and we title is this one All right, Let's give it a we use that enter fire. So So it's the reit's identifier. And now we need to work on our download matter here, so as create day. Sorry. Um, pile day 26 Download manager. Okay, um, you I can't and guessing you too. Class day they 26 No Lord manager. And then what we're gonna do is, huh? We are going. Teoh have also done all the movie data Tom loaded here. So before re download movie data, I want to just get the get the u R l So let me get you are actually and there's an e p I key. Uh, so there is a website called the movie D v dot or GTA. Um, this this one? Well, you can go and register yourself a free free, um e p. I had adjust yourself to get a free a p i g. And that a p a ki is what you can use to basically register for, like, you know, to get the movie data and, uh, get B I key from here. All right, um, for this one, who you would actually create a function called get latest. We's, um or popular movies. Get popular movies. Help her, please. Okay. And this is going to basically provide a completion handler. And this completion handler is going to be escaping. Mr. Ball, Uh, and then it's gonna have is gonna return the white, and it's going to pass movie data. Now, you must be wondering what movie to die. So we're gonna create a class with that name. So let's create a class call. Movie data. Okay. We're gonna conform to quotable vertical for this one. So? So that way, how can actually, uh, we can parse the Jason received easily, right? So let me show you what what it looks like. So this is the FBI, the movie d v dot work. And, um, he can go to this euro developer that the movie db dot org's less trees. The virgin movies get popular movies just the euro. And you type in your your Jackie and, uh, you basically, uh I mean, I've selected get popular first of all, and then yet to the sterile get popular. You could come try out Gary p I key in. And, uh, please don't use my a p a ki because they have a limit on it. Please adjust yourself. It's free of cost. Okay, so once you like, you know, you click on send a request. Are you going to get this, Uh, this payload back? This'd the descended get back. So things that we are interested in our, like, title overview and this backdrop image, our poster bath, any of those. Either one of those. What kind of work? I think I'm gonna take poster path. Okay. You can actually take everything on. Basically, just, uh, put your own version out there, but to show you an example, I'm gonna use, like, some off these, like, you know, vehicles, for example. Okay, now you notice that this is actually wrapped inside a in array, so this result is repeating. So if I click on here, you're going to see the same data for another movie. So there are a whole bunch of movies listed like that. So you're gonna get this whole array back, get, and that's what we can actually ah, parts and and put it in our table view. Okay, Now there's a There's encapsulating Jason like that. Price page, total results, total wages, and ah, results. And that's actually something else that we can actually parse so we can get to the results section, and you're gonna notice how you see this is gonna be So if you have worked with Jason previously, it is gonna be so much better than, like, you know what used to be Okay, So first of all, we are going to create a A class called envelope. Hi. Um, but and this envelope class is going to be quotable as long. And, uh, what this glasses go to contain is the outer on gaps late and feels so the recordable works is your properties needs to be exact same name as the keys off the Jason's gonna copy and Paste page. It's going to fester, and it's gonna be a It's gonna be Intertype, and it's gonna be optional. Make sure it's optional so that we lose Neil, you can European does not fail or your portable protocol does not fail. So for that reason, and then second key is total results like so and they says another hint, Then you have total pages. That's another hint. And then we have the main one that really, really interested in is the result so And that is movie data. Okay, so results it. Remember, on Lee the the key has to be saying data can be another A nested. Quotable. And we really don't need, like, all these three other properties. I mean, I'm not gonna build page or anything right now for this example, but reason I want to put it in so I can show you that you can have native types. Incredible as always, your own defined type A zal. OK, but for that type to be present in here, it has to confirm to quotable assault. That's why movie data has confirmed to court a girl, that's all. OK, so that howitzer started with the mood data. So we're gonna say we need title us for so you're gonna get the title. That's off string type. Then we're going to get over you has the second thing. That's our description. So against all of you, and then we gonna get poster bath poster path if the path off the image so as another string. Okay, um now, forget movies. What we're gonna do, basically, is, um I'm gonna I'm gonna copy and basis euro right here. You can make this Ah, dynamic. But for our purposes, begin, Just put it right here. He can accept as a parameter, that's all. So strength. And I can actually passed its strength right here. So let's say if you're building a pager, all you need to do a spot past page as a parameter, and then keep incriminating that page on, keep passing that and, ah, that's going to get you new results. Okay, So once you have that this unwrapped this most of all, then we're gonna go back to, uh, what we did last time. If you remember, we did. Your obsession not shared our data task. We could do the same. Take that. We're gonna do. You are all session that share that data task with the euro. And you're always going to be the euro that we just create it. Uh, yeah, this one. My care and test is gonna have movie data. We response in error. Okay. So we can put guard segment here so we can say guard enter has to be nil. Um, the Okay, So movie data, the completion handler is going to be an optional, uh, like this is gonna be an optional that way we can return nail here. Okay, so it has to be milk data. Let data has to be data. So there has to be something in data, so we can actually parse that. And that's about it. So we can say getting your response, because you don't really that if that's not the case, it's simply gonna call the completion handler, and we're gonna pass now, okay? And we're gonna return from here. All right. This way. Are Are, uh, this, uh, data is already unwrapped, and then we can simply do try catch so we can do try and then how you can say catch. And we're gonna print error dot Localized description. Whatever we get during the track, and here, this is very gonna parcel. Jason. So, Jason, data equal to um and we're going to try Jason Decoder, that decode. And this is thea type type, because we know that we are going to receive, um, this envelope. That's what we are interested in. So you can say simply envelope Garcelle. So he's gonna pass that and purse from data. So this is going to get all off our Jason data converted Basically into these classes. That's what's gonna happen. And then we're gonna call completion handler right here. Um, and if you're gonna pass Jason, data dot movies don't result, actually, as movies. So we get, like, you know, movie array has results, so we're gonna pass that now. When? If he encountered air. So we gonna simply pass completion handler mill. That way, we'll let our user know that. Hey, there was something wrong and you couldn't get it. So you could have Neil in this case. Okay, so that's Ah, that's about it for this one. Um, what we need to dio Let's see your made extension. Does it expect a UL string? Yeah. Awesome. So it expects the euro string so we can construct that year old string here. Um, right here I will do, is we create an array. And this is another technique that I won't assure you, so we can create a, uh, a variable movie off off type movie data. Okay, make it optional, and you can put an observer here, So there are a couple of other words did set in real sex. So dead set works when the item is when the variables already wearables value is already set and will set is when it's about to set. So we are interested in did set so we can call dead set. We can first check if there's any data so we can save movie if let movie is equal to movie . That means if movie has something because it's 10 optional then or real say it's for the image view. First of all, begins the image. Um, you are image image. So you may start, I think download, I think. Hey, Sink s why. Yeah, It made you think. And ah, this is where we're gonna actually have to figure out what the poster bath is. I think he had a poster bath. Used it for this one. Okay, there it is. So this is a poster path. So I guess what we need to do to copy deaths right here. Um, it's in there. It's in there. Documentation. So you can actually look it up, eh? So this is the poster bath on, and we can upend our movie dot poster bath unwrapped right here. Okay. We're gonna get, like, you know, bolster bath right here, and we can receive image from there. So I'm gonna say dispatch is, uh, cute. Dark mean dot a think And this is where we're gonna set our image. Be dark. Image is equal to, ah, the image that we have just down on it from the internet. Okay, that's for the image for the mood. I don't know if he's simply going to say movie title that text equal to movie doc movie. Well, we don't, uh, titles and we description dot text is equal to movie dot All of you. Okay. And really tickled self here. So that's going to basically gether movies. Image basically said our movies image downloaded and sent it. Asics Grassley. Um, now, before you forget we didn't call resume, remember? I told you. Ah, this Ah, this is gonna be the most common error we can call resume. So this is never gonna execute if you don't call resume. Okay. So, back to our view. Controller. Uh, why have thanks up. So, first of all, you are a table of you. Delegate. You I table view data source. We need this to and me to confirm we need to apply supply or make our figure it over. Delegate and data source itself that they will you that dinosaurs, It's equal to self. Then we're gonna call, Um Oh, And at this point, we also wanna download, start our movies, data download. So we can simply say day 26. Download manager dot Um I think how we need to initialize it, so dot Get popular movies. And this is bare where we're gonna get movies, and we're gonna set that. So let's create a able O movie off type and any side that is all we data. Okay. Scared Ray in itself. Thought we dot huh? Una penned all we can just hope a sign it like that. Okay, so they can say if let movie is equal to Louise it there's something themselves that movies is equal to movies data. All right. And, you know, call dispatch que dot main, don't you think? And south out table, you don't reload, Digger. So our table we got three loaded received the new data. So that's to the usual take number of roads in section return. Um, return movies, start count and then sell for row at and expect is going to be left. Cell is equal to table view that dick you for identify a cell as movie cell return cell bust And here watch this how easy this one is going to be. So he gets heavily as a cell that movies movie that the variable that we created And we simply gonna set this one and we will have to set any of the other parameters are our plates or anything It's gonna take care off that, uh, basically moving variable they had set up there is gonna take care of that. So this is the cleanest way off Writing your u I t v cells. How the custom for reading in how cuts himself. So, yes, A, um please an index path dot ro and this is going to supply the movie and, uh, then we're gonna get our way is also less run it and see if there's anything we missed that we should have covered. Or you should have done say, there's a crash. We know that something is missing. We put title and we're on it his policy title because, like, you know that you know where you are. And it's a good practice to have, like, you know, title. If you have ah, navigation bar. I bet up because it looks more clean. Okay, so let's reached a 26. He and, uh, we're gonna let me go. So we have all these movies loading up and look at that. One of the other thing that you actually might notice is ourselves automatically adjusting to the height that it needs to show the detail that it has basically for that overview. And, uh, that is one of the thing. One of the other thing that I won't do actually show you how you can basically taken off those you know automatically out of automatic height. Thanks. Okay, So Ah, this is it for this video. I want to show you. Like how you can do. Ah. Ah, your own download manager. Download stuff on need, Egan. Basically, how you can leverage that extension that we have created earlier to a synchronicity download images a zealous like, you know how how to artifically just heights and how to use quotable protocol with the data that you downloaded from the internet. So I hope you guys found this, uh, radio useful. And, uh and I will see you guys in the next video. Thank you. 30. Day27: Hello and welcome back, Teoh. Day 27. And today we are going to be talking about data detector. So this is a really cool AP I Ah, it's part of a regular expression, basically, that he can use to Artemis to detect if you're if you have, like, a whole bunch of code, like, you know, open to text. Where is the address for number email link, like a Web link or stuff like that automatically detected within your text and give that information to you. So we're going to try that out today s. So let's get started. I can go ahead and create the U controller like so and basically assigned this any Shelby. You and, uh, give it a day 27 seconds older. Gonna need a few things here. We're gonna meet next for you, and sex for you is going to be ok right here. It's gonna be your point from three size and height is going to be 100 in Sony, and, uh, then we cannot need a button. So that button is going to be basically your sales person. What's gonna personal data? So maybe 10 point from Top and Dane and 10 0 R. Nothing is. And basically is nothing here that we can actually central I it so and then just center horizontally and then you're gonna need another, um, text. Like so Okay, so that's going to be again 10 and asked you and, you know, from sides, uh, 100 sunny as height. Let me go. Eso do some quick things. So let's clean up this. I don't want to see that data there, all right? And has changed the font to be having their next same for this one. And let's call this button Hearst. And, uh, basically, we're passing data. That's why it's house and custom. Come in and next, and there we go. So that is all done. Now, I would actually put some ah, simple text in here that has a variety off things included already. So you don't see me typing. I'm gonna copy and paste. Um, next, I have a simple, just some random stuff that has address basically somewhere in the middle of the text. First he had don't mention anything about the Everest, and I don't mention about the phone. My skin is still going to detect it, So that's the That's the cool part about it. Okay, so let's make sure our biggest or has a class that's get has created a few ah, outlets and actions. So at I b outlet week war in court next for you, your eyes next for you. Ivory out lit week are output text you You are a text for you heart and his create Ivey Action did tap arse button center. You are. They go and ask your title. Cool data detector. All right, so and here. Uh, let's just connected. I'd be Clinton. This is connected is first of all, so selectively controller, go to the outlet inspector on that input Connect e up put connect the tap written on touch up inside and we're set for two p controller. Go back in. Here we go. OK, the first thing we need is import strict. So let's get input string and this string We're going to get from input text for you, Doc Text Next thing we need is what types we're detecting. So types to detect is, uh, off type and s text checking result. That checking type. Okay. And, uh, we gonna dissident all right, and we can throw it in its text. Checking result out checking type dot. Be looking for address, but you can see they're a bunch of things that actually supports it. Supports Kraemer or photography, phone quote, Um, regular expressions, spellings and stuff like that. So we gonna stick to address and phone number? Hi. Um then we're gonna create data detector. So data detector on this is going to be We just gonna initially that here. So we're going to try and s data detector, like so. You know, Roy types types that were created types to detect those air types dot Probably because it takes it. Takes the een, um, rob value right there. Okay, The next thing we need to get range eso let's get the range for entire strength. And that's make range. Start from zero. Take our input string dot basically get its utf eight value and get the count, so it's going to get the camp. Then it's gonna do match. So we go say matches found in things that are gonna be all the Magister gonna say detector that matches in string. So we're going to supply our input string right here. Input string options and the options were simply gonna say, Rob, value is Europe don't like your first option and we didn't say range. Okay, then are we gonna create detected for number Babel? Just a string empty one in an dress, detected address, components and components. And this is the crazy part. It actually not only detects the address, but it actually the text street, city zip code and stuff like that. So that's what we have here. And it's off an X text checking key. And this is the dictionary off key being and the stakes checking key in value being strength. These errors are the warnings are going to go away in a minute. So now what we can say its if let matches if there is any match is found in matches found. So if there's anything in there, then we want to jump inside to slow loop or each match you're saying, Parse that and see if the match Dr Result type is equal. Do dot address. So if it's an address type, do something else. If match that result type is equal to phone number, then do something else. Okay, So far, no resistance to that detected for number is equal to match that phone number. We know it's already one for number, but he can create it as an array. And it would actually show you if there are multiple phone numbers, that'll it will show you that. So I says, like, you know, coalescing. So we just say, if nothing is found that just show empty you get now, um, for the address, it's so very simple, we're gonna say at detected address components. Ah, and we can say And this text checking key dot ST asked street. Okay, assign value off match and that address components and unwrap that. And this text checking g dot ST There we go high. Let me copy this. So you don't see me typing first state for city thin state, then sip. So simply change the city. Just gonna check City, State, state, Um, zip hands him. So that's how ah, that's basically where it's gonna detect all the data and put it inside our our variables that we have created. Now you want to show these. So what we're gonna do, basically, is we simply gonna put it in our other dexterous, so out put text You don't text is equal to and we can say se ST. And this is really gonna show, uh, this on. We're gonna copy Premiere. Right? Here you are, says Street, a new line character in place. They say city, and, uh, we're gonna put city and you lying character, and then you have a state. If I can type correctly, man. Okay, state. Then we have new link actor, and then we have ah, ever Street City State ends up. So sip, not lip. And step is once again, it's on, and you're gonna have a couple off new line characters, and then you're gonna have phone number, okay? And this is what we're gonna show our detected phone number detected, remember? Like so. Okay, so let's make sure our everything is set. It is initial and has a vehicle. So let's run Day 27 and see for detector is any good. I know it's already good. Um, every day, 27. And they have some data that has won 23 Main Street, San Mateo, California. 94403 In it where I can place a call on this number to get more in four partners in less parses. And there we go. Well, we have, Yes, Obama, we have some other things that we need to correct. OK, so that was a warning. And we should have factually looked at that. So let's add coalescing, operator. And if that value is nil, we gonna show empty. Like so. Okay, that's really run it one more time to see our results. If they're working fine. And, uh, we'll wrap it up. So I see Day 27 purse and they go Street is 1 23 Main Street. San Mateo, California Zip code. That is off. It did not. Oh, now it's not. It's not. Detectives follow. It's my problem. Okay, sure that. Let's face it that it expected, do we to be the right value. I'm glad we don't say that. We found the issue and fix it. So let's give it another try. And then we go. We have everything parsing as like it should be. Okay, so that's it for today's video. And I'll see you guys in next video. Thank you 31. Day28: Hello, Mac. And in today's video, we are going to be talking about a arc it. So what we're gonna be doing, basically, is gonna be creating a, uh uh uh and they are kidnap. That's gonna show basically a cube inside Tweety Space. So this a good starter for, like, you know, us to get our feet vet for our archaic products. If you need, like, more detailed and thorough knowledge on the ark, it I have another course time. You might reject that out for more details, but yeah, let's get started. So have ah, date on the eight open. And, uh, we're gonna go ahead and create e u Controller and closed his bottom panel. Make this Michel pew. They're going eight. You could tell her now what we're gonna look for. It's a are seen. Get you. That's what we need. Not this bright kid, but the scene Get because you're gonna do we gonna work with three D objects on a two d sink. It is for tweedy antics and ah, strike. It is for duty objects. So we're gonna just drop it in it to all the sites in gonna go back in the uh, the controller he gonna post import from er kit? Yeah. Tybee. Opulent. See, and do a RCMP Such us create an outlet is guy and connect thes Connect it in. Did you get done with this story, Bart? Right. So for the first step a arc, it actually works. So we did a camera, and it has a capability to do leverage all the sensors that he have inside here phone basically render a scene, track and object and basically keep an object in place within Tweety Space. And Apple has done all the regarding the work or you So you know how to like, you know, worry about manually, uh, monitoring thes sensors and positions and logging in keeping these positions everything. All that can be done with adjustable single are two line of codes. So we're gonna do that right now. So we're gonna call beauty Bill, appear super docked, you will appear and you made it, and then I get a create conflict can pick, and this is the could pick that actually configures the environment. So we're gonna say they are world tracking configuration. Is it the object that we need? And we simply gonna say seeing you dot uh, session dot Run where? The configuration and configuration. It's going to be a r session air well trodden configurations. So this is going to basically take care off, setting a lot the senses and basically, uh, things like being detection in rage rating image recognition. Jancker addiction from the objects in several of things are combining. Ah, whole bunch of input from different sensors on, like gyroscope, accelerometer. And there are some Excellency Gordon started Kapler's based on the scene that Inditex and stuff like that. So But you have to worry about now those so we can just keep on moving board way won't do. Basically stopped the session when we disappear. Serving is a super dot You will disappear any minute in then, uh, product that we're gonna say sex scene view, dust station cars. Okay, seeing impale association and then call super appear so reasonably calling it later. So we are done with our work and whatever, uh, whatever we control in Eastern basically destroying objects and stuff like that. It can do that now. Um, all right, next thing how we are, what we don't do This is this is the entire set up that we need to do for our objects to be placed in attracted to make that. Now, let's put an actual object in Italy. So add a box so we can have no set up box. You may go que Because it's going to be a cube. Had cube. Okay. And, uh, we're simply going to create a cube with asean box object s e n stand for sink it. And, uh, this is where steam get hot objects OSC an object and, um seen box on is Thea. Yes, one of the object up redefined generation has created for you and it takes the northern matter of with height length in camp for radius. That's like, you know how much our curvy you want your box to look like. So all these values are in meters. Gonna say we want to your 0.1 meters in 2.1 for the campell radius. Okay. And then we're gonna create an order. S e n note note is the debase object where geometries are added so because they know dot gentry is equal to box and our cube basically, how and then you can put position for the note is a position note into this basic and says Jesse and Rector three make several position it zero on the X access here on the Y axis and the excesses where you are seeing. So you're in your cameras. How, uh, your phones, cameras centrepoint. So if you put negative objects, move further away and they look right in front of your camera, if you put a positive value than they go behind the camera, that means they're behind you see after turn around to look at them. So we're gonna say negative zero point fight, okay. And then we're gonna create a scene. SCN SCN Scene and seen is the object, actually that displaced three d content for the sink it And that's what we're gonna adds That three d content is seen is going to be added inside our air space. Okay, so then we're gonna say, seat that route for you, root node dot and childhood. And I'm gonna add Q as our child node that we want to display. And then we're going to say seen view dot See you his ego do seeing cranks up. Okay. Sorry. It has to be known. Not cube geometry is assigned to the note and node is what we can add to the scene about my bed. Okay. All right. So that make sure you have you have a physical phone connected and like, you know, you can basically use that phone. Uh uh. To run the app. This is not gonna work on simulator. Also, you are going to need a, uh, you're going to need a up. You're going to need, like, you know, exports X phone. Uh oh. So it is not excellent. IPhone six s are more or greater. So, uh, s Oh, yeah. So that's, uh uh, uh, that's what uh, that's what it's. And basically, after that, how you need to do is run. Uh, so anything more than six s plus, it's gonna be able to run your year air it based APS. So, while I was talking, I was also actually configuring my phone so I can actually display what's going on my phone . So I'm gonna run the app right now My phone and, uh, going do display. Oh, actually, there's one thing we forgot. So before I do that, let me, uh, let me listless to that change. So for air ca to work, really camera access. And when you when you need camera exiting you to add that hendry two D. Um, in four p list. So gonna go privacy. So the camera is it and say camera or they are kit. Okay. And that lists were on this and take a look. All right, so I'm gonna This is my, uh this is the phone. How do you think? And, uh, when I scroll using my finger, the phone go down to day 28 and this is a dialog box that we added a permission for Click. OK, and let's look around and OK, so we can't find our object. Well, that's understandable, because we forgot to call our ad bucks our ad cube. So so dot ad cube. Okay, that's for you on this, and, uh, okay. Still come by. Bill succeeded. Happy. It's gonna launch a second. Okay, so there you go. Scroll down to day 28 and we have our cue. And as you can see, it's actually in the 20 space. You can see it from top from the bottom. It's Ah. Okay, so So yeah, so That's eight for today's demo. Um, and we can do is I would actually encourage you to explore a bit more on, like, different types of shapes that he can actually support. And what, what else you can do is basically you can you can look at sink it. Also check out that course that I was talking about because I can give you, like, you know, much more detail on the ark. It right will be Is it going to studio? And I'll see you guys next week. Thank you. 32. Day29: Hello and welcome back to day 29. And today how we are going to be looking at a natural language processing using in Iowa's. So, for this holding a do is we're gonna basically have some text written in different languages and have the NLP off Iowa's basically recognized what kind off language. Now it's the next piece of text is written in. Okay, so let's get started. I'm gonna need basically have created a heavy controller storyboard and 80 control. And I dropped the controller right here. I don't actually provide the class, so let's do that right now. And, uh, basically all good dudes, you're gonna set this initial be controlled. Her next thing we're gonna need is text text you like, so just drop it in there, Have you go? And, uh, then we're gonna need a button, So let's drop a button. All right. And, um, a label. There you go. Right. Celeste, that these constraints in centres property So was that set this constraint phones or text you, So I wanted to be 000 in the height to be 100 running. It is actually the 130. Okay, Now, with the but How you gonna Dr Drag it down on a bed. Hi, Kwan. Okay, there you go. So, for buttoned, it's gonna be a 10 point from top and ah, begin. Center line. It's so less, uh, center horizontally cental. And it like so And, uh, then the next thing we're gonna do is, uh it's basically best line. This one So is again going 10 points from top and, uh, going to be center hers on police enter in the container. Like so I said it's ah if all text and basically that their fund the custom and this is going to be near next having an extra thanks to be better. Okay. How are they gonna do the same thing for button? We gonna get button? Distinct Says not only gonna dio detect, look out. But salt's gonna detect the language and translate that. Well, you Teoh, uh, lookout while you to the text, says we're gonna dio so But the label we're gonna set lines to zero and then change the fund to be from there next airy. Probably. Okay sounding Bynes. Okay, cool. Now let's head back to agree. Controller, Let's create three ivy up. It's require Maybe we're gonna need only to you are text view pack at the outlet week. Well, result label, you are label. And the third thing that we're gonna do is we're gonna create high reaction. So at Ivey Action funk, Um, detect blank. Underscore. Sander, you are button, and that's good. Right where you forget. Let's connect these to the, uh, storyboard. So Result Label is this one decks view is this one and the deck languages dissection or touch up inside. There you go. Okay. Now less make sure that our not text is equal to plank felt that results labeled our text. It's equal to blankets. All hands out the title hes equal to and I'll be demo. Okay. And and then how window it's we gonna create a, uh, an array. And I'm gonna copy basis Serie. And this is basically saying hello. How are you? And I want to 34 567 different languages and ah, actually, currently, and API supports a lot more languages, I think about like, 200. Plus, um, I'm not too sure about the number, but it actually supports pretty much every language that is. Are there most of them. And, uh, and, uh, that 63. The the beautiful thing is like, you have to write just a little bit cold to actually harness the power off NLP engine inside IOS framework. So, um, before we actually move forward, I don't actually tap on the screen and cycle to these messages. So what's thing we're gonna do is yes. A, uh uh, data zero. So whatever it is, that data zero tendex going to show that in the next text for you. Okay. And, uh, then Okay, quick, get shuffle data. Shuffle up. Random. Um, strength. I said no. Basically create. So we're gonna create a random function, a random number. So random and dart or random. And the range is from zero to less than data dot com says basically gonna produce a random number between how range steel to date about count, whatever. Seven. So it's gonna basically generate number from 0 to 7 at random, and then we're gonna shuffle through that. Okay, So, once we have, um, got the random member, it's simply going to say text you, doc, text is equal to data Random. Okay, Now we can create a tap, So this but at upsy for this one so we can use it as a selector for our tab gesture. So you can say, Let tap gesture. Did you go to you? I tap gesture Record night, sir. And because he target itself in selectivity shash selector. And this is random, Frank. Okay. And then we're gonna say self taught view dot Add gesture. Recognize? Er tapper gesture. Okay. Okay. Now, once we have ah, what you have just recognize er added, uh, less go ahead and run and, uh, tested out once to see if our gesture is being recognized. And thes messages are cycling through before we proceed. Gets of building up. Um, all right. Okay. So it's good day 29. And there you go. If I tapped through it actually cycles through generating a random number. Sometimes it actually asian really just a generous the same number. That's why you don't see, uh, the language Beings change. But if you tap over and overs can actually cycle through the entire way, Okay. So ah, let's create a couple off helper functions out. Actually, it started to Declan Lang, and we're gonna go, so first thing, we need to do, Basically to start NLP are using them. A plea is me to create And this linguistic tagger that tags language based on different tags schemes. So we're going to say let dagger is equal to Ennis linguistic dagger. And, uh, we're gonna define the scheme. And the scheme is this for this? We're only interested in detecting language, but he can also just remind lemma for the world Mexico class name types name or Mexico class script token type. Um, yeah. So these are all of them. We have. We are interested in detecting the language. So that's what we're gonna bake. But the option we can just send it to Theo, and then we're gonna say tagger, that string. Basically, this is the string where the tiger linguistic tiger is going Apply its rules to detect ah, the language and its on its texture you dot Next. Okay, um, now we can do it like, you know, we can detect determinant language within this string, but plus creative function, because when you detected Armenian thing, which is only gives you a look, Kelso gonna say lang to locale. So lange look hell to name so basically gets us Ah, look, l And, uh, um, we gonna convert it into an actual strength. Okay? You need another function. So basically, you can. What happens is like, you know, from the local you can convert. Ah, the it to a language. But language is written and its native format. So if you dissect Korean, Korean is gonna be Britain that the language detected this Korean, but the Korean is written in Korean itself. So we're gonna create a simple helper function and this helper function. So let me copy and paste. Actually, this one because it has Justice Lee statement. So Ko is Ah, it's Korean. I t is Italian. So these other codes a t a s hes Tamil. Yes, this Spanish If I is finished and Jay is Japanese so these are all the languages that are actually currently that that that text Hello? How are used written in. And, uh, I just, uh I just created a simple statement. Do act basically just want those. So I'm gonna do is we're gonna get the locale first. I guess A And that's local from local identifier which is being supplied by a local I d. From this sex right here. And then we're gonna say, Have you discovered called us? Look how Lang Lookout, Teoh. Just one. And we'd simply going to say tagger here dot dominant language. So it basically gonna supply the dominant language to this I d to this function. And we're gonna use that to find out the local that fair supplied. And we simply don't see results level that text is equal to, and we're going to get country from code eso the code is locality. So we're going to get the, uh, uh, country code from there so lookouts can supplies k o i t and everything. And then what we're gonna do is we gonna basically upend the string and say locale dot display name. And the key is, ah, language code. Okay. And the value is basically look, l i d. So this is gonna convert our, um, our language, our code into the locale. I d Okay, so this is unwrapped us all and, uh, going to get the country code. And surgeons have a written Korean and then Korean written in Korean yourself. More thing I want to make sure is everything is center line in this label. and after that, let's give it us. But Okay, so So that's a little day 29. And, uh, you have, ah, Spanish Earth. And they're still let's detect language. And then we go Spanish. Ah, basically written waas Spanish in Spanish is espanol. And, uh, then you have ah, this language. That's the Tamil. And he concedes that, detective. And now this on finish again. Tell me. Oh, that's this finish Italian. Ah, this one is a Phoenician. No. Okay, I'm looking for Okay, So Chinese traditional All right, a cycle through until we get, like a Japanese one. Yeah, that's a I know that Japanese because are actually used it in the estate of it. Yeah. There you go. So Japanese. So as you see how easy it was. Basically to detect language type just based on the text that is written inside the text for you. So that is the power off and on the engine. Ah, this comes with your I was framework within your phones. So hope you guys enjoyed this video. And, uh, thanks for watching. I'll see you guys in next video 33. Day30 Part 1: alone working back to date. 30 in there. Today, we are going to be looking at, um, Coram l example. So basically, what we're gonna do is we're gonna develop a, uh, she learning image recognition app. All right, so for this to work out you can do is basically we are going to be, uh, t me. Now we are going to be important a machine learning prudent pre trained machine learning model and then going to take images in classify them just by using a purely machine, learning to recognize those images. Right. So let's get started before before we start own import. Ah, mobile net dot ml Marvel file into the, uh, project. And this file is basically condone word from the Internet. But it's actually a neural net classifier that can that can basically classify a lot off different objects. And if I open this file, you can if you notice there is a section rate says, like, you know, one of the things. So I let me walk you through. There's a name. There's a type of plus a for other sides that's included. And, uh, and like in a description, how that talks about what it does and also the license. And then you have one class. So this actually class is our Michael generated. As soon as you, um you include this inside your project. And if you don't see at this class regenerated, simply click on the target membership and make sure that this checked off. If it is checked off, that means you're gonna have this class build momentarily. It takes some time a little while to do it, but this error would appear and you can quick on it on try to clean and build it for doesn't work. So next thing how model evaluation parameters And these air basically shows, like, you know, inputs. So what's the input for this hell classifier and one of the output. So basically takes an image, and it outputs a label with dictionary that has probability for each category. Angela's our class labels string, which basically says what most likely this image lost like Okay, All right. So that let's get going s so basically what we have is, uh, is our, uh, storyboard. So we're gonna first tom dropping you controller right here like that. And, uh, next thing we're gonna do is we are going to be dropping and meet you. We're gonna show our image and bin it. Ah, Then we're gonna, uh, not control ship then. But the drugs shipped l and drop a button, right? Yeah. And this button is going to be for camera are picture, uh, add foot and photo. So let's add a, uh I am OT So you say. Yeah. Hey, look scared and then actually from India, so I spit. That looks good. All right, so that's gonna add a, uh, at a photo. I don't know, constrain it. Probably like, you know, 10 10. However, it on the corner and then gonna need a, uh, you're gonna need a label has all It's a list droppin label right here. And, uh, this ah label is, uh, going Teoh less. Actually, that's do it differently. So we're gonna have oh, Blair, do you? Okay? And, uh, you just blurt for you in the corner right here. Um, and that size actually looks really good. So you can keep that with tonight, and then I'm gonna a label inside right in the center. And, uh, yes. I don't want it change its fund to be, uh, having their next 15. Boyce is your line And say this is touching 10 points from each side. Like so. Okay, so called ad photo right here. That way. That way, when Dio opens up a chills at a photo, we click on this button right here to add a photo hint unfolded a piercing heater in our machine learning model, then basically tries to predict what kind off what kind of object it is that's looking at inside the image. All right. Okay. So everything have soap. See everyone a role that but I do on a select image view can to make sure that it is aspect picked. Okay, so let's go. Let's create a new file on the create our little great extension right here for, uh, CD image property orientation. So, screen that extension CD image, property or intention, This is that we're gonna actually convert you. I made a presentation to corresponding CGE image property orientation. And we need that. Because how this is what's gonna work with our Sheila remodeled. So you simply say we're gonna printing in each lives air here and stay or union station. There's gonna be you. I image or inundation. So you need image. I o for this to work who I am Age or Ian. I think it's changed to your image dot orientation. There you go. That's what we need. And we say switch. Oh, mutation. And the cases are up in our up. Um, yes. A self is equal to dot Up to basically the current sensor for through the sort of working with up married down we see yourself is equal to dot Up mirrored dot down so herself is equal to dot Down, down mirrored so and then left. Okay. And, uh, last one is right. All right, so that's our orientation. And, uh, now with this, let's get started. So we need some more import statement. So you need Coronel course, and we're gonna need ah, vision because it makes region. Makes it easy for us to work with the image based data because it makes it, like, you know, um, super efficient to supply an image without any transformations and stuff like that. Otherwise you'd have to actually transform the you made. Basically, make sure that 40 model is expecting the image site. Should be like, you know, that shot that size, it should be reflected is all, like, you know, in your input. So you have to make a lot of adjustments. But if he used region, it becomes how really, really easy, Actually, do do do that. So that reason we gonna use vision Very work for helping us out with the image processing. So I be outlet first fall, um, week Where, uh, he made to you first of all, so even add image, you then, uh, I the outlet camera. So I'm naming it camera button just for this example into basically, But you can We're going to use it for, like, you know, image pictures. You re selection from the from the photo gallery, but you can actually extend it to use with camera. Classy vacation label came, So All right. Um uh, Thats s good. Okay, So next thing we need to do is, uh, uh, we're gonna create a few a few Ah, lady of our properties. So we're gonna create the request. No, we in core. Um, el request. That's why we're gonna use our normal model to generate request. So let's do that solely the You are, uh, I love the quest. Basically, classifications request. So I am core ml request. Okay. And recently gonna capture this inside. Try get our do try Gedge Uh, block I print, um, error Don't localized. Oh, just predator And we're going to hear is we're gonna fail it. Model is equal to try. We in, um, we in core ml model. Okay. And basically, this is the model that we're gonna have begun a You. So this is that you define your mobile net mobile net, um, decides dot model. So this whole that is coming from that sir file that was generated after this mobile net dot animal model was important. So theory that you think that's this that generates this class and meekness and he says it and get the model our friend from Give them that is creator requests. Rian core, I have a request, and, uh, this expects a model and the completion adverts. So model is going to be our model that we just creative completion handler is going to have a request in air, and basically, we simply gonna process classification here. Okay, We're gonna create a function on a little moment and got a call that function here and after that way, also gonna set the property for most image, crop and scale options. Basically, for the input image to be center crop weather, questioning. And then we're gonna turn the question. I think so. Okay. And, uh, what, we can do it, huh? Less throw a bit of a letter here if our model is not initialized with her message. Okay, I guess. Reductive, actually. Uh huh. Sort of build it. Oh, see? But complains. Okay, Right. So that's had some of the good warnings. Eso We need to make sure that a surfboard is any show and has a class of day 30. You control her ago, and while you're there, actually, we should have creator are played connections. So camera, but a hair classification label. And right here and image you is just one right of them. Okay, next thing we need to actually Ah, make sure that our that process, the classification processing is has a place there were were doing that. So let's create a function for what? That So funk, um, glassy vacation. And this expects a request. And this is the end quest. And then you get in there, Uh, and basically just air optional and reason we are actually ah, passing request in these two. Because we can do is we can simply call self dot Classy vacation here in supply four. Request there. Hair like so. All right. Has no remember. Oh, yeah, it's classifications. Declassification. OK, there we go. So, uh, we just wanna just wanna make sure that goal and supply as is, And then we offload that processing, um, work down to this function. So, um, so that so you do. Okay, so let's get ah going in this one. So we're gonna plus create dispatch, uh, que that main doubt a sink. And then, you know, first guard let, um, class result request that results that you get all the results if we don't get any was also against Just simply say, self dot classifications labour. The text is equal to unable to close. If I okay simply and then you retarded. Okay. Um and then if if the results we received, um, if we have any results, basically, those results are always going to be inform off we and classification operation. So we can also say that let classy applications. It's equal to results are plastered. SOS, basically the one that we have just extracted adds and a rail viene classification observations says gonna begin array of that so we can unwrap that assault. Um, so if the classifications in classifications so you received its count is zero are basically dot is basically that is empty. Um, then we can simply take this. Can't say unable to classify, I guess, I guess. Same message. Um, so we could do this. We can also Oh, yeah, we if the count is not equal to zero, and if it is zero, then go inside. So don't do this. It'll and then we're gonna start basically getting our top two results. So I let up results physical, two classifications, and we get, like, you know, prefix. So basically, start to off the top results. You're going to get those and get descriptions for those top results gonna map them on. And this is going to be classification up, sir. Oration. And, uh so classifications observation and and, ah, recently gonna return a string that that's actually formatted and format where you have percent 0.2 f so basically allowed to flooding. Well, you so to up to two decimals and percent at which is the next parameter. So basically, we're gonna first show her, um, classifications in operation dot Um, And you can we get to Elise? We get, like, confidence, and we get, um ossification dot identify their okay. It's basically this is gonna i d What? The label it. This is a dictionary that we were talking about. And this is actually guesses the confidence. How that it has on on that on that Well, you just being actually mean the object that's being recognized. And after that, we just gonna say self dot are classifications. Mabel don't text is equal to, um, uh, district to say description array. I see. Got joined, separator and separator is going to be slash. So my new line character, it's gonna basically join those two alleys and show that All right. Okay, so ah, that's actually a good moment to pause for this video, and we're gonna continue Hi, in a bit. So see, guys the next video 34. Day30 Part 2: all right. Hello and welcome back. And, uh, you can continue forward. So basically, what we have done so far is we have created our, um, a class classification request and our classification function where we have when we receive the request how we won't actually make predictions on it, and, uh, and then show our user what truisms are. All right. So before we proceed less actually create an extension for the view controller in this extension, what we need as how we gonna were gonna make sure that this pew and shoulder confirms to you I image speaker control delegates several. You are image maker, control delegate to end you. I navigation control it so we can actually show the Miss Baker. So you gonna say, uh, did finish picking up the image? That's what we need. And, uh, they're simply going to festival Begin, are dismissed. The picker completion is now and then how we gonna get the image out from info dictionary and the information is gonna have you know, I image picker Tolliver. You I am a speaker controlar dot or reach no image. I am a vicar to our operational. Mitch. That's typed out I think it's gonna Her mistreatment controller has been chased to your irate controlled Dr Four ke. There we go. So let's fix that. And, uh And we can say, as you are, image right image, real image to assign this image, do that and then going to call a function call process in reach, and we're gonna supply image my image into that. Okay, So let's create dysfunction. And this is going to be image. How do you image so call your death right here and we are ready to process our image. Okay, so basically the step that we need to do or expressing cost for all gonna update our classification label that text hi is equal to working. And then we're gonna first get the orientation. Bakst begins it TG property Tichy. It's easy property image, property story. See, e g mich proper to your addition. And we're going to use the overloaded ended matter that we created. You may start image or intuition will supply the image or addiction and convert that orientation, get the orientation, informs off our seedy image. Property orientation. Okay, then how are we gonna guard let ah si I image so we're gonna convert this image into, See, I'm actually gonna say, See, I image and, uh, convert from image, other rights to fit Delaire and reason we're trying for a little air because, um uh, unable to process because I find that is we don't have to, actually. Why didn't you return? Our program actually crashes right here. It helps us get your mind that this is where it has bean crashed. Okay. Next, we're gonna, uh, dispatch a global Q and, uh, background thread. And then, uh, basically, that we simply going to say is appreciated. We're gonna put our work. Are processing work in place. It can be done on the background, Ted. Okay, so let Handler is equal to be in in age Christ center, and this is going to take HAC. I basically the we need the one that takes see, I image, uh and ah, orientation. So let's find Come on. That has image and orientation. They're sorry. Yeah, that's a blast damage right here. And we're going to supply the or indication that we actually just extracted and options of them to be No. What? We don't need that just thinking out. Then we're gonna do our do try because, uh, the method that we're gonna basically handle it's going Teoh Constipation. Okay, So mattered, uh, that we're going to use needs the's try block. So against try handler dot perform. And it is simply Dixon array off requests. So class request. Okay, so this is going to process eso, as you can see. Like how? Um no vision has helped us here processing the entire image, basically taking the model on taking a request and converting it and basically also depending. So the our property is like image crop in scale options on all all those things. Excuse me. So this helps are basically us in a big way because we'll have to alter the image mentally and how vision favor handles that for us. Now, there's one more thing that's left us. I'm gonna take our camera, but and gonna add target to it. I don't be gonna add mental target for this one just to show you another way. So the u. N is a touch up inside, and the selector is going to be, um, select photo and center. It's you. I button that you go. OK, so that hand just needs to be at upsy okay. And, uh, we're simply going do on that button button click were simply gonna launch the speakers. Say, let I am G baker is equal to you Our image Speaker consoler Speaker got delegate is equal to itself Hand each speaker dot So cyp is equals to don't photo memory Hey, conduce camera. So if cameras present and, uh, you simply gonna say percent you controller I m g picker enemy to true completion. Simply remove that. If it's nail, he can actually that option. So I see. Yeah, Select. All right, so that's building Run on. Uh, check it out. Have added some images of like, you know, apple and bananas into this photo gallery. And I do iPhone where you can add it to basically just drag and drop. Your emergence had similar trying That's gonna take. So let's click on Day 30 and, uh, had a photo. So that's the had a photo. So click on the button. You can't just go launch. Uh, yes, subject banana. It's And there you go to get, like, you know 0 76% is bananas. 22%. This mortar, some kind of mortar. Hi. So this select apple and there you go, Granny Smith, Apple O R s A cricket ball is not a bow. It's, like, more, more likely, it's actually Granny Smith Apple. And it's like this one. I still accept bagel. Maybe because, you know, uh, thinking like this is half good bagel, But but anyways, yeah. So this is one more thing. Actually, CTO title is equal to core now. Patient example. Yeah. So yeah, so it's a it's a little bit low rez, but as you can see, like, you know, it's sometimes mistakes. How makes a mistake, like, you know, identifying what kind of, uh, thinks there are. And this time it detected, like, you know, there is a fountain basically a valley. And I say if we choose this, uh, it's basically saying flower part and coral leaf. Um, pretty funny how you can say what what happens with this store, This one and looks like a damn. It does look like a damn. And cliff former drop off. Okay, so, um, let me show you, like, in a hard that under the blur view that we had, it actually looks like because it looks really cool. So against a, uh, scaled to fill. And just for this example are lower image is gonna be half crab, but you can see, like, you know, this nice blur view showing up, huh? We debts that extra effect. So let's see, um, go to day 30 and had a photo and basically select one of these and they go, they see, like, you know how it has rarely include. Province is actually correct. And, uh, this is how it shows up. So this is it, guys, huh? You survived 30 days. How? And finish this three day learning. I was 12 and learning and development hope you guys learned quite a lot. I obviously had a lot of fun, so I hope you guys did do. And I will see you guys in future courses. Please make sure to leave some of the awesome feedbacks and reviews and I will see you guys in the next reading courses. Thanks so much