Building a terminal helper app using UITableView and custom cells – Swift on Sundays May 26th 2019

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back to Swift on Sundays folks if it's your first time here the routine normally is to make a nap in about an hour to an hour and a quarter every an hour and a half that's an all plan this time we're actually starting 15 minutes later than normal and that is entirely my fault the project I've made for you is vast it's far far too big which is obviate it would make for a very boring live stream so I cut back the project and tried it again and I made it through about a third of the project in about an hour so I cut it back some more then cut it back some more then cut back some more and it's still big but it's way smaller than it was I've taken out a lot of stuff to make it simplify as I suppose I can get it basically I hope it still compiles we're gonna find out if not we'll do some on-the-fly rethinking in my head to figure out where it's all gone hideously wrong but I've made it I think as simple as is feasible as possible I can't make it any simpler not that being uninteresting anyway the project this time what we're making is an app that helps folks learn the command line so if you're using Mac OS everything as most of you are that is terminal that app in the in Mac OS and that is the UNIX command line where you can type commands combined together to make more advanced commands and see the output that's what the command line does is of course prevalent on Linux or BSD s Mac OS 10 and and even Windows these days so it's a very important skill to have and the app is designed to make that easier by giving focus or window into it now we're gonna design the skeleton the app here but it's very very easy to expand add more and more things we're not gonna do that because I did try and it just went so far ahead with time it got silly so this is the guy thing when I finally get around to right up a swift on Sundays book I will expand in great detail to talk about the things I'd love to do this stream and simply haven't got time for so like I said it's simplest and get it will figure out how it goes anyway it should be an interesting exploration of table views for the bit we actually have time for before I start I'll remind you of our rules they're very simple we do have admins or moderators in the channel who watch out for these things first there's no harassment or abuse zero tolerance for that second if you have on topic questions as I go please ask my emotion to chat window carefully if you have ultimate questions I everything else ever hold it back to the end if there is an end of course it's quite a long stream and I'll answer at the end that's the plan I also have some announcements next week yeah like in about eight days nine days is Swift over coffee live a live podcast with between myself and my friend Sean Allen at a live swimming episode it's free to attend it's all kampf if you go to a URL paste in the chat window you can go and watch that that'll be lots of fun I put into the chat window there it's gone run a ticket the free of charge at all can't you haven't got having all comms to get to come along and getting that thing does not give you're not calm to get either there separate events just held at the old compromises which is next it dub dub DC so as that also is also have live which is about 40 days away now I'll paste a link for that if you want to come to that is my own conference a two-day event here in the UK teaching everything new from dub dub plus stacks more plus and my favorite speakers so that's happening soon come to that please and finally go and snag my app unwrapped from the App Store learning iOS up with having a link as well and that is free of charge no IE peas on the App Store to learn Swift so go check it out Alex that's a brilliant question that's kind of guys you wanna leave until the very very end otherwise I'll have no help doing this presentation okay that is all the announcements and all out of the way then go ahead and launch Xcode and then share my screen so you can see what I'm doing otherwise we describe the Xcode to you for the next hour or two just not much fun at all so in OBS I will choose that button boom okay so there's the chat window nice and clear fantastic yeah and here's Xcode so I'll choose create a new Xcode project there we go and as nearly always we're gonna choose an iOS single you app and this time I'll call my thing terminal wizard okay it's an app to help me learn the terminal in a in a wizard like way but press that then press next saved your desktops fine boom come on there we go okay so our layout this time is basically through table views but only one that really needs design in terms of storyboard the other two ones trivial that requires no design whatsoever is it's basically empty almost and the third one is very complicated comparatively for other two so we'll be doing that entirely in code but this first one we'll do with a layout in our storyboard so I'll open up the main look storyboard and we're gonna have in our layout is a big table view full of options you know here are all the commands you want to run cuz I said unix commands work you say do a then put the output from a and the B then B into C then C the D and that's your full command right so this first screen will be a table view of all the commands you have stacked up you know list all running programs then count how many there are or find all files owned by me from in my home directory and then whatever to stuff right you a then B then C then D here we're going to do I think three maybe four here time you can add 20 trivially to this to add you know once once the codes done adding more commands is very easy so we're gonna do I think three here to get you started so a big list of commands then below it is going to be a label which will show the command line terminal command to run like what about these three things this is the actual command you want to type in you can you know use a little gooey to select your stuff then see the actual command to run hey you're on Toronto you want to go the new Swift Toronto event I'm actually speaking out later on in the year it is Swift compte oh it's an always 13th at Telus Harbor teyla's Harbor go on check that out it's a one-day event in August all right back to the agenda so we're a bit above you and label at bottom now you'll see of course on on iPhone 10 style devices at the bottom of the screen is the home indicator so we don't really want to get our label underneath the home indicator or keep it above that thing but also needs to stand out quite nicely so I'm gonna do is I'm gonna go ahead into the object library and start with our tabletop boom come on that table of options below that I'm gonna drag out a UI view a plain UI view and place that down here then inside the UI view I'm gonna add a label so we've got a table which will be most of space below that a view inside the view a label like that I'm gonna give this view the little view of the bottom a background color of dark grey and inside that a label of white so it becomes really clear here's a load of tail stuff with you know white text you know and then a below that in grey a background color inside that our label text that's how the layouts gonna work now we want to do read make this thing look good is have the table view fill up most of the screen because in theory that could be many commands running here because that's the best thing about units commands you can run as many as you like together I just get more more powerful and below it is this grey box it'll sit below table view and go right to the end of a screen it'll go below the home indicator so it fills the bottom screen with gray and inside the gray area is our white label text but that should not go below the home indicator so we're gonna add some constraints here to make that whole thing so opposite together first I'm going to control drag from the label to its view to the view it's inside I'm gonna say this thing has color shift leading top and trailing constraints to that view like that I'll edit those constraints so they are exactly 20 each so training's 20 leading is 20 and top is 20 now there are red lines on my screen because that label has incomplete constraints it doesn't know we're actually going vertically because there's no bottom constraint doesn't know what to do with itself here so I'll have to add an extra constraint what we're gonna do is I'm say hey label I want your bottom constraint to go outside your parent view to the main view and use bottom space the safe area and now it's got a full set of constraints almost not full but almost so to be clear it has constraint that two different things is leading training and top constraints they go to the grave you it's inside its bottom constraint we'll go to the safe area prathamesh asks will the hunt go to change color it should do it's designed to scan what's below it and slowly change color to us or opposite color brightness wise so we have our label like that now it still is angry because the view it's inside which reason constraints for has not got constraints so we've tried to add Auclair constraint something without alternate Lestrange doesn't ideal but the concepts sound well one small change don't get me to make by the way a live bottom safe area should not be 1 5 6 it should be 10 so just slightly above the safe area so that is our label positioned inside the gray box the next thing we're to do is position the gray box our control drag from that interview to the out of you and if you hold down the Alt key will change between safe area and container margin I'll hold down alt and shift so I can select multiple things I will go ahead and select from here leading and trailing and bottom and it's disappeared in the screen if it's got all sizes orbit wrong now but that's okay and for those constraints on add some hard values not just random values my screen I'll say trailing constraint should be double-click on it should be not to the margin to go right to the edge of the screen and the constant should be zero so it'll go right to the very edge ignoring all safe areas for its leading where are we to that view again view for its leading constraint there we go again I'll select second item and deselect residue margins it goes right the edge of the screen and hemo constant of zero so go right with the left edge of the screen choose you again and she's bottom space and the Select margin and say your constant is zero so go to the very bottom the edge and now you can see it fills this bottom space nicely but inside it the label still space based away from the home indicator this is nice because we could have said you know oh yeah the whole thing is there above her indicator then you've got a gray bar than a white space below it doesn't look too pretty this way the outer view around the label goes right to the bottom under the home adhere to as needed and the label float above the home indicator nicely and even better we haven't specified a size for this great area it's got no idea how big it should be but it can figure that out because of the constraints from the label inside that label were told it has a 20-20-20 sizing around itself plus ten from a safe area and so as is labeled gross the UI view grow as well for the good actors inspector here and say you know you've got lying zero go with minis lines you need if I add more text here by doing the no label label label label label label there Lele level boom it'll just get higher and higher and higher and the great thing out of sit around it flawlessly every time looks really really nice so that is a nice way of putting a label at the bottom of the screen and that's our label and view area done so a table view this is much easier right now I'm gonna say the table view control back to the parent view hold down shift I will do leading trailing on top so go edge to edge and then for the bottom constraint I'll control drag from a table view down to the grave you so you'll figure out how much space the gray view has used up and use the remainder for itself for its constraints of course I don't want random numbers because we have like one four four and five three four point five that's all junk artists enter in zero for every one of those constraint values the table view so it goes edge to edge boom look at that now of course you'll know I nearly always put my table views inside navigation controllers I'm super lazy you can of course handle the top safe area by yourself in this case it's important to get that bar the old zit fix the safe area for us but also we're gonna be pushing and popping other view controllers shortly so I select my view controller and go to editor embed in navigation controller so go to another controller and gets pushed way is it even go to what even happens there that's all way down there useless thanks though Ivy I can't wait I don't he's only a few weeks away now I was talking for that for sure anyway so table now move down to make space innovation try the top move up to make space where I lay flat bottom and that is more or less our layout there's not a lot to as you can see there are tools that encode this is all day programmatically of course we do need to have some table view cells we could encode there's no real reason to do so here we can go on because I'm here anyway if you state table view and change its prototype cells to one choose that cell call it cells I'm lazy I think this style to be subtitle and give it a cursory disclosure educator little arrow on the right and that's most of our layout done wait some connections of course we've actually modify this thing so I'm gonna control drag from the table view up to its view controller and say you are datasource and you are the delegate so get you information from the view controller and finally using this in editor I'll add some connections so we can refer to that table you and the label at the bottom in code so I will control back from table view interview controller Swift and say you're called table view and the label not the view around the label the label itself control drag from there it's your code I'll call that thing output that's the output from our command will be shown in there okay that is our UI done so I'm gonna go ahead and get rid of this and it's a delight to have you controller it's time to write some code so what do I put inside this table view the answer is a list of active Unix commands that are they are part of their command chain they've said show me all files owned by two straws then count how many you found or how many Prem is running right now how many you found whatever medve darhk's is okay to depend on add suggested constraints it's a very good thing to use it does use lots of very interesting fuzzy logic like if you get it off by a few points and you layout you'll get a very different set of constraints it is best to figure out what you mean basically but it's you know lots and lots of guesswork and never half so I use it a lot when I know what I'm doing but I'll always check what it's done I'll have a look and say what constraints it's made in my own work I nearly always just do constraints by hand yeah I know what I want but I have seen situations where like I think project mm 18 or so or 16 of a queue of Mac OS we've got quiet you know 15 20 controls and a layout and it's like no but it'll make all those constraints by hand add missing constraints boom it just works it's like wow that saved me 20 minutes of control dragging which is quite nice anyway so this first table view is to show a list of Unix commands do this then do this then do this and do this and it lends flatten all 4 of those commands to a single piece of text the exact thing you want to run on the command line to get those 4 things to happen that's the plan so I'm gonna make a new struct that represents a single units command so I'll say command end new Swift file and call this thing commands Swift and let's begin with it's gonna be super simple right I'm gonna what already adding a handful of commands cause literally time constraints but we're gonna say that a simple command you know I don't know how you how could your UNIX is right now but one of the commands we're gonna add is PS aux show me all the commands that are running on my Mac right now back in four shows you on it on the terminal window if I have Terrell somewhere open let's just do yes a PS aux boom show you all problems I'm running on Mac right now and you know there are stacks of these something in my Mac right now and they're mostly long because mac's don't tend to have short command names so it doesn't even fit on the screen let's try again there we go so cost me a British running cool cause it is a OS kit where that is who knows my login internals there but showing all all commands doing other use of commands everyone's commands are being shown right now in there somewhere anyway so those are commands Amani and that is a simple command in my eyes we're not gonna let user add any parameters to that it's just P X P s ox boom that's your entire command so it's a simple command there are no options so that will let the user right the options are the complicated interesting part we could look at and we'll look at shortly but first we'll do a first simple command with no options so I'll say struct command and a command has a friendly name string this is you know show all programs not PS aux it's just show all programs what should actually be and then next is another property called route command again this is a string so here's the basic part of the command in our case that is just PS or because there are no options to work with but later on we'll add one find which has many options to work with you know do you want to find a particular file name do you want to find case insensitive where do you want to look from and so forth but they all start with the same root command which is find that's our route command we'll say another property here called VAR must be first which is a bool and this is the case for a handful of commands I've had I wanted dogs arrived I'm sorry there's no sleep a chat yet sorry you gotta wait some commands about quite a few in our list of things must be run first you know you could type command to command a command tomorrow from Africa of course Cali Unix but some only make sense when run first for example we have when I'm gonna have three commands here and total this application one that can scratch already one that finds stuff one that counts stuff and one that runs programs should text runs and running PS Hawks now PS Oaks show me which params of running must be run first because you might say oh yeah count how many things PS alt returned but you couldn't then doo doo way then do B then do C then chain that to Hamlet you know running how many commands arow doesn't make sense so this sorry the dog ding right in the way um do you want some attention clearly so yes it's some commands must be run for has made sense to run otherwise good question John duel is PS that actually command and aux nor the options yes you're right there's a distinction here that the options we exposed to the user we don't care or they don't care what the underlying root command is they just know that PS aux aux is the actual command to run I'm not exposing a and U and X as individual options could that be overkill the people learning the terminal anyway so rusty first or not and we'll add another property which is called summary which is a string and let's actually complete a property Alice gonna do for now return summary here I'm gonna add some more code of that on both dogs were here now that there's no super chats you don't any treats will add some more look in there to calculate some summaries of these commands later on like you know look for this file name or whatever account word or count characters for now we're gonna do summary here just to gets moving in the right direction that is enough for now the last update viewcontroller.swift to say how do you get squeaky toy since the game two dogs have made so much noise in my house do you twin here not have it right okay we can now say if you can toilets with I want a array of commands to be in here boom as a property and we can now make this view controller serve up rows of those commands so it'll say how many commands we have all three then this then this and this and so forth so first person view control its swift I'm going to say you conform to UI table view delegate TV delegate boom and UI TV datasource like that so it knows how to handle those to form protocols I'll say in here that we have number of rows in section we'll do return commands count so one Rover every command we have and then for self a row at index path that's gonna go ahead and the queue one of those cells we made by doing cell equals table view DQ's will sale and the fire is sell index path or just index path hide this bar on the right path so it's more space there we go we're gonna pull out the command we're working with we'll do let's see M D equals commands index path row and now you can fill in our title label and detail level using the command name and the command summary so I'll say cell dot text label dot text is CMD dot friendly name which would be like find all files like that then cell data text label dot text is CMD dot summary and right now as a fixed string saying summary but of course that's going to be something more advanced later on you want to do later on however we'll make one small difference we're gonna say if this command must be first if this thing happens to we you know show all primers that are running whatever happens to be if it must be first we're gonna say this text label has the text color of blue else sales tell it's a stable text color text color is nil so the default so it's pretty clear users hey this thing here needs to be run at the start otherwise it makes no sense okay and then return cell so that will show in our table your controller all the commands they've selected in their main full final command of course there is currently no way to select commands you know what they actually want to run we'll do that now our press command n make a new file choose cocoa touch class I'd say this is called a choose command view controller you might find the Easter it's in subclass of uiviewcontroller odd UI tableview controller because UI tableview controller makes junk for you I often just do that they get a UI view controller class and then afterwards make it a UI tableview controller class just to avoid the extra Koen - you want like that question from prathamesh difference between those two method calls DQ usable cell identify ur & DQ weasel cell then fire for index path the difference is the formal one returns an optional tail of yourself it might fail to what you want to do the latter one always turns you've hit with yourself and will crash if it can't find one with identifiers you requested and they're both useful in their own way in particular if you want to make subtitle sales it's very painful to do with a former or the latter one you want to use the four one two that in this project I think we using only the latter I was I was busy trying to rewrite at the last minute to use the last one I think I got through all of it anyway we'll find out it's an adventure anyway this is where well they want to select one units command to add to the program this is where the screen they're gonna see it'll say what command you actually want to add I'm gonna say this thing has a weak VAR command controller which is a view controller what to report back to when they've chosen the command to run it'll also have a verbs ba commands array as an array of command and that's gonna be filled with all the commands they can choose from now the first version in this project which was about four hours long did this entire thing using structs and codable I took that out pretty fast because it's actually surprisingly hard to do this in codable I took me a lot of explanation to get it exactly right for you there for folks to follow along with instead I'm gonna do it in code because just simpler in the time we have anyway first a muted low gonna say this thing in a table view is gonna show cells there's nothing fancy here it's just regular table view cells so if you did load I'll say our table view register a cell class UI tableview of view sale itself for Enda fire itself so we can get tail view cells as we're asking for a cell each time that think prathamesh that is what makes the second option was another fire for index path work you don't rest your cell there you won't get one you can nil back and it will crash your code that's where you use the first one we say all got nil back make my own one by hand anyway for now we're gonna add two super simple commands us to work with we're gonna say let PS equals a command the friendly name is list all running programs the root command is PS Orcs aux muscly first is true this thing doesn't make sense after find all files then run all in still running parameters it makes no sense a second per second to the command then commands dot append PS we'll do another one let less equals a command with the command with a friendly main a name output oops to scrolling window Andrew come out for that is less and this must not be first or did not be frozen you can make less you really want to we'd have to so we now have two commands to work so odd that's the commands aware as well and these two actually work nicely together you could say show it all running programs and piped and less if I were in a terminal window here you can see this thing is longer lots of things what am i Mac will just white so slow all the time if I run PS aux boom is lots of things scrolls if I do PS Orcs pipe less it goes to scrolling window I can now scroll around using the cursor keys and that's the command we want to build that's command you're gonna be able to build when you've added those two in the right order to our program so that's PS orgs pipe less that's we're gonna try and get to pratt mash ass well I've met that really in this path only works for yourself first yes exactly that so why the register it by hand using that command there register a class or nib for and enter fire or using a prototype cell in the storyboard whatever works for you anyway two commands to work with next we can say number of sections number also W there's only one just Lotus things to choose from which command do you want to add for silver right in next PATH we're gonna say let's sell equals a tableview DQ's yourself heads fire self index Papa's index path oops index path the command is commands index path row there in cell dot text label dot text is CMD a friendly name we'll give it an accessory type as well so those are tap through the next thing if they need to is doctor's closure indicator but again if this command must be first then cell text label text is blue else cell text label text is mandel like our text color no text idiot Hudson no what does tail wish to do this thing says when we want to make a cell called cell that's what we expect to receive back a table view cell so down here when I say give me an entire cell I'll get back one of those things and that really matters you know shortly in what depends about 20 minutes up you know how to talk what questions I get we're gonna have different kinds of cells being returned based on what they've asked for based on what requires to configure this command so it becomes really important to say here's one cell called select his one called check is one called cell whatever and it'll choose the right one appropriately anyway so that will now create DQ and show various cells which is great we'll show this thing when a button is pressed in the first new controller they press add they wanna add a command here available commands which one do you want to add so if you could want a swift if you did load I'm going to say our navigation item has a right bar button item equal to a UI bar button item I'm gonna use bar birthing system item we're gonna use the item dot ad which is the little plus icon in iOS target I'll do self and the action I'll do hash selector add command which is not exist yet the let's go can play in a second when it catches up so what if I our ad but I'm gonna add a new command that means showing our choose command view controller with all the available commands they put one of those we added to list that's the plan so down here we're gonna say a table C funk oops funk add command we scroll down mix with space there we go at command let VC equals a new choose command view controller with the style of dot plane so no groups will set ourself to be its command controller so it can report back to us oh no making me static I'll come back in a second and then make make it us ourselves this command controller and then do duration controller question mark pusher II controller DC animated true so is a mistake apparently missing returns self oh yeah hey thank you very much returns self good spot yami-yugi anyway in theory that more or less works yeah it's great ok so now I've said we've got a button in the top right corner of our original view controller with a little plus icon and when that's pressed created a new choose command new controller make ourselves it's command control report back to us when a commands been selected I push on to the navigation stack show on the screen so I press come on are now to build and run it to see how it looks big white screen awesome yeah there we go so it says plus a few love a good healthy plus and there are no commands in there cool I have muffed up something along the way it's what my left up rear commands you did load command first so right next power ah number of sections didn t number of rows in the next path my mistake number of rows in index path as are in section sorry is return commands dot count silly mistake don't do that in your code make sure it turn the correct number of rows otherwise I'll have a blank screen like me and look stupid lie on YouTube okay I'll buy us again and hooray um today I can see it we have list all running programs and output a scrolling window this one is blue because it's the kind of thing you want to run first does it make sense to be running the second this one is not Luke's it makes sense being run second or third or fourth or fifth right so things carat code the gauge is nice what we can't do is choose one of these things doesn't do anything right we want to do really a say when if pressed list all running programs add that to our command chain and go back to the previous screen so I can see list of when a program is now selected and usable in their command that's the next step so over in choose command view controller I'm gonna add his self right I'm gonna add below that did select row at will have tap one of those rows in the choose command box we're gonna say pull out the commander selected by saying let command equals commands index path row so chose command 0 come on one command 10 we're up to be will then call a method on the view controller saying hey this command was added and you know this choose who our controller doesn't want to care all that means we don't reach into the array and modify it we just want to say hey this has happened you do what you need to do so in you control it Swift I'll say funk funk command add it some sort of command and we know that means you know commands depend back command I thought it really means internally but you know expose that to the world so we just call command added and we can now use that inside our it's like right method in choose come on view controller we can say get the command that they've tapped on call command controller question mark doc command added and I call it add command know what I call this thing come on controller I call it come on at it isn't working that's like Xcode maybe it's there the rest come on B give a chance to wake up perhaps let's try again command controller a question mark dot area come on I did Xcode being a bit slow come on added our command and then navigation controller question mark dot pop to root view controller animated true so we've made our selection go back to the first screen again so they can see on the screen like that now that's not gonna work just yet in fact it's this try it out by press command I can see for self it doesn't work because even though of commands we've added it's not in the UI so here's the home screen is a plus button our shoes there's running programs back to here nothing visible and that happens because we haven't we load the table view so over here you control it swift we're gonna add somewhere near the top we're gonna say view will appear so when we're being shown again course super view will appear animated animated and table you don't reload data so reload ourselves when we're being shown again to reflect the new command changes a press command huh have it over time oh really badly excellent this only a fraction the way through is this pretty so big it's so big anyway plus it's running programs boom it's now is all in there but sparing window okay so you can see they can basically build up a series of commands being run it might miss you want it right now and it'll basically run through all those and output one big long label of the actual UNIX command to run to make those things happen it's clearly not right summary here there's nothing the label but this counters progress right I think anyway let's try and go a bit faster by the way if you are enjoying these videos you enjoy Swift on Sundays it would mean a lot to me if you would like the video because I do rely on folks liking videos and leaving nice comments to help YouTube recommend the video to other people without that YouTube doesn't show that it anyone else so I do rely on folks liking the video sharing it and in comments and so forth subscribe to the channel it does mean lot and does help me out and of course it helps me out I make more videos he helps you out so by liking the video you help yourself and help me everyone wins I'm good so like the video and subscribe the channel all those good things anyway let's move on to the the challenging stuff and this is trivial stuff right it's listing running programs and stuff I want to really dive into what makes tableviews tick and this is where it gets much harder I think and this is despite me try to trim it down dramatically I see a long stream here like this right we want to do really is look at some more advanced commands right we want to look at commands options you just can select as sorted earlier PS aux the aux part is an option to the command we're not exposing it here just list all running programs all they see we're now gonna make a new command where the options are exposed to end users and they can choose which one they want so I'm gonna start by saying that you're right video yeah look at those likings shoot upwards thank you very much does help it really helps you a lot you know you're like in the video and of course helps you too so everyone's up on it anyway I'm gonna go ahead and add a new protocol to my program to represent what options look like at the very least let me have to know about them so I'll say the new Swift file and this thing is called command option power and what does super do with method calls it asks the parent class to do its work for those methods so when I do the my view did load method code I want the parent read stuff first and I believe this was the case for a very very long time supervillain load did nothing at all I you have you control if you don't know did nothing at all but that might change any minute any day we don't care I was assessing to do out next week let's face it it'll be in there they may add things to you have your controllers who would be littler method and you aren't calling it it might hit problems so when you can it's usually a good idea to call super anyway without a protocol to describe what command options look like so I'll say protocol command option it's gonna have only two varieties values for it one is a title string what this thing is exposed to to end-users you know find user name or is it Caitlyn stiff or not whatever we're also going to say is there a prefix string now this is important because let's say we're at add the find command and one of the options gonna say is find things owned by user two straws and this is useful because we want folks to say you know enter two straws fine look for the word two straws to do it with a fine command you have to pass - user two straws that - user part the user our programs my care act they don't know - users by using our program that's our prefix will silently add - user before their value of two straws okay that's all it takes to be a command option now we're gonna add three different kinds I've chosen three because it's described a wide range of commands very easily while also showing you some more interesting Swift one is when you can choose one of these several values a B C or D do you want to look for this kind of thing or that kind of thing for example in the find command you can say start from the current directory or start from my home directory or start from the root directory or start from somewhere else so a handful options to choose from you know three or four or five over to stronk that's one type second type is a toggle switch do you want a or do you want B for example when you find stuff do you want to look for the file name case sensitive so if it's two straws capital T capital S otherwise don't so that's that's K ensive the third type is a text entry look for particular thing look at a file name called this thing or views name of this thing so yeah prathamesh is said always a good idea to call the parent of the method of superclass you're mostly correct but there are so many exceptions to that and some will go aside a very good one I think exactly exactly I would have given it is load of U and similarly the observing value to KVO will often crash and call the parent it's just bang hurrah anyway so it's not always but usually it's a good idea anyway so it's three kinds of things work with when he's selecting things between options a B C or D there is a toggle switch area so it's on or it's off or it's a free text entry so you want to enter the user name or the file name search for whatever is so our press command and make a new file I'll say it's a new Swift file called select command now this thing struct select command is a command option so we can use it inside our commands add options to a command which means it must have a title string and must have a prefix string will also they give it a value integer which of the things was chosen was it option 0 1 2 or 3 plus friendly values is a string array and actual values is a string array now what this means is the actual value has say things like do you want to search from the current directory your home directory the root directory or somewhere else things that use of our iOS app to understand really clearly the actual values you know the current directory is a dot a full stop or a period you know the root directory is a slash your home directory is a tilde so there are actual values that the people using app won't know about really cuz they're learning the terminal by using a wrap so it was a friendly values array of strings and actual values array of strings that will match up in size and more map together now this ideally really really ought to be a struct really because you torna share model later randomly but I did find going down a struct root as in the 30 minutes this video in my test run so I'm gonna take a hideous hideous cheat here and make this thing a class now if you're not familiar different spin class and structs are that classes are shared between owners if you say I have a distance the object and so do you with both points the same instance which means if I change one it changes for you as well and that's really helpful here because the reason that's helpful shortcut is because when we edit a command we can pass it into an edit controller they can edit it their net changes in the original view controller as well and normally when you're making outputs a really bad idea we're passing a copy or a struct version of that modify it then post it back again that adds in a 30 minutes the code here so I'm making a class make it easier it does in the flipside mean with a writer initializer which is always always annoying in Swift particularly here because initializer is trivial so what we're gonna do is we're gonna make initializer quickly and I'll show you a useful shortcut for doing initializers of a classes quickly for like this casting we'll say there's initializer called title which is a string prefix which is a string value which is an int friendly values friendly values which is a string array and actual values which is a string array like that what we're going to do is we're going to select all these properties and just paste them all to an initializer then I'm going to hold down the option key and drag down where as far they say I now have five blinking curses I can now go ahead and delete Vaughn all five lines like that replace it with self dot I can impress alt shift and right to select the next word come on see to the clipboard delete the next bit and paste it in so you get like an instant class initializer um and it saves so much time the multi cursor selection in Xcode particularly was Swift because it have to do this thing by hand every time it is very very annoying anyway so that is our entire select command class right there and again that's the one we have multiple rows of stuff as a B C or D I look another file which is where as a checkbox a toggle switch a is on or off I press command n do a swift file call this thing a check command and again I'll say class because of shortcut reasons check command yes I know that man well I explained why I wasn't going to do that I have thought I did anyway there's also a command option this has a title string and a prefix string this has two commands once called check command which is a string and once called an unchecked command just drink and the reason there has two commands here because with find you say look for the named abc.txt and that's done with dashing - named abc.txt that is the unchecked command for is it catered stuff or not if it's knocking sensitive used - named ABC if it's check if it's enabled we were checked him I was just - I named insensitive named abc.txt so we two commands here depending on what if it's enabled or not in there switch box and we have a value as well so we'll do value is a string that's our bullet are we checked or not again read initializer so I'll do in it title string prefix string check command string unchecked command string and value bull and again if you weren't pettish at the back I'm going to go ahead and copy and paste these properties into the additional Iser boom select one and you option tubes option to drag down or five delete them all do self dot on the clipboard delete the aftermath equals that that makes literally no sense man well we try it again perhaps there's a choice right there ruchi Sh we are gonna change the property values which is grossly wrong trust me it's it creates a whole world of problems this shorts at this short-circuit even though it saves me a lot of talking it still creates other problems you have to fix in your own time so now sharing instances of classes everywhere which is just disaster area anyway we modify them directly which is a bad idea you want to use struct you want to use let of course you do memorize our size is much much better anyway we can't do it here for time reasons because it is already five past seven already knowing more than our ah almost now sorry they're not check command that's the one with either on or it's off and finally there's one more very similar hope not file txt sorry you should be text command text command like that text client okay so class text command is a command option a title string and a prefix string it also has a placeholder what to show in great hex in its text box where nothing is typed in what's our gonna add well this thing is numerical not will say var is numeric is a ball if it is numeric Russia small part of the wise a default pad and then a value string so the actual text they've typed into the command initializer we're gonna say oops in it with title string prefix string placeholder string is numeric ball and value string one last time copy all properties paste them into the class hold down option and just drag down in front of our delete them all do self dot put all the rock values on the clipboard and do a paste that boom that initialized all three types Michel strand should be optionals um no no and I think so I think they're pretty good as regular strings what if you embed this struct in a class which struct do you mean the command struct or any struct weather will the valence start being shared yes so what your third is a technique called boxing and unboxing if we put a struct into a class the class becomes shared therefore the struct has also shared its technique called boxing and is helpful in a handful of places broadly speaking data like this works best when its data in data out not a class where everything is shared anyway we now have three different kinds of strut of class to work with which should be struck by the class here and we can now attach those to our commands we can say hey this fine command you have multiple options to work with so I'll say after must be first bar options is an array of command option that will cause our current code to break because we have to pass an empty array of options for PS Orcs so options is an empty array and less also options is an empty array like that okay we'll never find several different kinds of option checkbox selection option and text option without attach those to commands so I think what command can have many kinds of options inside it the importance that next is to let users create a sorry choose a command like find and then select all possible options what value they want look with this file name case sensitive in this directory owned by two straws whenever it is a tale of awards options and this requires creating some custom table view cells you don't have to do this you can do of course without this it's more ugly too much of the other SEC a cleaner and nicer more maintainable way of doing it I still think I'm some shortcuts because he sometime is buzzing on so quickly but at least it's a better way of doing it so we're gonna start making a new subclass of UI tableview cell this one will be called a check table view cell that's the Orang off box as the switch thing i'll press next then press create and jump we don't need this stuff automatically at all fine it is so this thing is gonna have a switch inside it i the successor review it'll say do you wanna do this thing yes or no so we'll say let toggle is a UI switch that's a special to work with we're also gonna say when that switch has been toggled it on off tell somebody else it's happened say hey this things happened what you want to do because this will be owned by the main table view controller it'll say oh you've just turned off k sensitive attach that to our command so it can modify its command as they're choosing things and when what a lot using your closure will save our switch changed is a closure that is bull is it on or off i returns void it's optional so we haven't good at their path and initializes so is the is a switch on or off that is our entire value we care about now we can say override the initializer with a step cell style we'll just Pat it on the super straightaway super init ever styles passed in identifiers passed in now when we have a table switch inside our cell we don't wanna let you just tap our cell to select stuff you know typically that things shouldn't make it go gray so I'll say selection style is none leave it so they can tap all they want to nothing actually happens when they toggle the switch we want to make sure this switched change closure is called but you can't do that of course in Swift because the guys took off the writ of C don't see uses target select the stuff what has to do is do a little method internally to our cell which will handle a switch being changed and we'll call switch change the closure so whatever else is owning this thing can figure it out what that really means so I'll say our toggle switch got ad target call self with a selector hash selector selector switch changed for the event dot value changed so when the flip the switch call a method in this case we're gonna say at obviously func switch changed and immediately this course which changed call our little action that was you particle with switch changed action something to make it a bit clearer switch change action it's optional I will pass in whether our toggle switch is on like that so that's this thing here our switch chain method is essentially just a little a little thunk and little layer between the UI switch and the closure we've passed in because you can't go close directly we call local method called switch changed and that caused the closure I say go do it sadly anyway add that targets will call just to make sure we'll call toggle dot size to fit make sure it's the right size for itself that's my idea and assign that to be our accessory view that's the thing on the right hand side of the table view cell next to the label let's review equals toggle like that it's God's warning us we have to implement in it coder so I'll just do a fix it there boom we don't care not using in a coder here using in it style okay that's our first cell style whenever a checkbox on or off the second one in a text field thing when in the text box they can type in too little work in much the same way maybe local method we call where the textual changes and that will call a closure somewhere else I say okay because this happened what you want to do so I press command and again and choose cocoa touch class still you I help you sell subclass this time call it text table view cell and press next and create this is really similar to the previous one so I'll say we have a text field so let text field is a UI text field has a closure that we call what a text changed so I'll save our text changed action is a closure takes a string the new value that is set to returns void and it's optional the initializer I'll override the defaults else I'll initializer call super init straight away passing in that style and the identifier again we want selection style of none so there's no gray box may sort of tap around the text box but we do need to make our text field have some configuration because the text all by itself is you know no sighs no placeholder and no style no resizing doesn't look great right with a modifier to make it more interesting we're gonna say our text field most importantly has atomic which is translates auto sizing mask into constraints Tech stomach is false text field don't add target self hash selector text field changed that's a little bounce method across the closure looks like last time for editing changed and I like that closure now for the method sorry for its angry I'll say of C funk text field change that and I meet this Caltex changed action passing in our text field text or at least Ranger can't find it again we cannot call this closure directly from the ad target call there's no way of doing it at UC / Swift is impossible we are bound to through a local method that cause a closure for us sucks they go as before got a template in it coder so fine just do fixed it's fine that's the fault it's good we're gonna add some more options here to make our text field more useful because by default you get auto correction get auto capitalization and stuff things that make sense when you're adding someone's name or address or you know I post it note whatever it is here though it's a UNIX command and they don't respond very well to being auto correct little capitalized so I'm gonna turn off that kind of nice and is tip nice staff by saying text field dot auto correction type is dot no and text field full text field dot Auto capitalization type equals none I love the way once called dot know and it was called dot none consistency we want this thing to report back to the table use cell when editing is finished with a rest return key we can hide the keyboard by default we'll say text field delegate is us and modifier declaration so we are a UI text field delegate so we can understand when returned by its pressed what to do we'll do one sneaky hack here I explain later on and it's again a shortcut to try and get this thing through faster because it's already twenty minutes past seven we're gonna say text field doc tag is some number now you couldn't use a course you know one or two or a thousand what I'm putting hacks in place for tags particularly I'll nearly always use some obviously wrong but in this case a common one is 0x dead beef its hex s remember de a DB e EF there are these things you can work with you know a lot of people will use things like cafe dude whatever some obviously wrong number as saying this is a hack it shouldn't be here it's me a better way of doing this thing we'll come back to later on you'll see at our text field and that's gonna fill out all the available space so we'll go ahead and say content view dot add sub view that's hexed field and we're gonna add some constraints here to make sure this thing fills all the available area now we don't to go reading all the area because it'll go right to the very left and right and top and bottom edges won't look great when I go to the area around the layout margin so it's a bit of padding around the edges so it looks a bit nicer on screen so we'll say NS now constraints dot activate an array of come on not that array off there we go an array of text field dot top anchor dot constraint equal to content view dot layout margins guide dot top anchor boom then copy/paste out a few times we've got for these things that's top anchor we need bottom anchor we need leading anchor and we need trailing anchor like that modifier first but as well so top bottom leading and trailing okay one last thing I think this class which is that we've made ourselves be the delegate of our text field and we've done that so we can say in here text field should return which means when the press return what had happen we're going to say our text field should resign first responder then return true say it's finished its job we're finished with the text field and that gives us a three we need for our table view cell we have JW cell for one off we have texted yourself and some text the third one is just select one of these three things that's a regular table view cell there's no custom class required for that I also have rings self.size Neil yourselves there's no need for it here it'll size by default to fit because all we have is a text box which will scroll to the right and a checkbox there's no need for it here anyway we now have three custom Callum three custom ways of making cells checkbox cell text cell and the built-in default set cell type and I'm going to wrap that into a new table view controller which will show all possible variations of those check out those cell types for the commands we're going to work with this takes quite a bit of code as you'll see what we'll get through a press command end there's a new color touch class I missing a UI tableview controller called edit command a command new controller again I'll hack here and make a UI view across a class get less code made for me does wind me up a little bit and then make that a UI tableview controller class just so I get it less things to delete boom okay this has only one property which is the active command it is editing they've chosen find that's command working with that's the one ago modify so I'll do var active command is a command implicitly unwrapped it must have one unanimous certain if you want to say it definitely has one but it has to have one in order to show his screen it'll be a load I'm gonna say a navigation item dot title the title of our controller is the active command friendly name so find some files yes ma yeah you're seeing a tiny fraction original project was it was so much bigger anyway friendly name some final files be the top by the screen this is we're gonna register multiple types of cells so we say we want three kinds of cells one called select for us multiple section options one called check on one called text so I'll say table of you register the cell class UI tableview cell dot self for identify er select so let's select ABC and D use a built-in table view cell type I will copy paste that twice more and say for the check type I want to use a check table view cell and then for the text type I want to use a text table view cell so my custom subclasses of the UI here we set up classes are used for those two and finally I'm doing this little thing in here which is to do table view dot keyboard dismiss mode lovely thing in iOS you can make it so that when they start dragging the table around dismiss the keyboard so I'll do on drag I should say that interact is usually quite nice as you can cancel by pull upwards again but on drag can works better here they start dragging hide the keyboard okay next up how many sections do we have now to make this thing look really nice hello aria how are you doing first thing look really nice we use a group table view with multiple sections down the line so you can see exactly where things are so isn't confusing so sorry dogology you know aria anyway well I say in here number of sections I can't give you scratch clear off how a sections are there it's simple however many options we have so I'm going to do return our active command dot options dot count so but every option we have will have one section on the screen for ty thank you very much for UPS lady OS we're rocking there's needed for the titles per header in section we're gonna say do you have a title or not cuz the slate won't make sense choose one of these three things you've got title to find it make sense so a text command it'll be do you want to user name here and big user name box below it but for the check command we're not gonna add a title to the header because the title will be next to the check box it'll have title and then checkbox in line with it until you said itself so only two of our cells hides will have a header title quick summary of keyword Smith mode again yes because I can't there's only only three to work with one is none leave the keyboard up either scroll around freely what is on drag so you drag slightly hide the keyboard gone but I normally use is interactive which means as you start scrolling it'll start at it in the keyboard away and as you scroll more hides it more and more and more to that's confident it'll bring the keyboard up again so you can cancel as you go in this case I think on drag works better but experiment you know you're coached only anyway in titled header in section we want to return title only if we're not a check command for a check command option we don't want to have a title cut in here we sell directly so we're gonna say let item equals active command dot options this section number read the option we're looking at right now and if this thing is a select command return the title of a command so I'll say if item is select command then return item not title else if item is a text command return item title but if we're still here there's neither of those things return nil so a select command cut our title in in its cells because that's being used for the friendly names to select you wanna use a home directory or different directory or the root directory whatever is the test command can be used to it's filling the whole space of the text box the check box has enough space to put the command title directly another check box will return nil for that one next up is height for header in section I'll do height for header in section and try and scroll down make some space in this one we're gonna say is there a title for this thing or not if it is what allocate space if it isn't we want we'll say let item equals active commands dot options at section and if the item title is empty so there is no title here use a small height right only a little bit of space because there's not much space required otherwise return 40 for a nice chunky big title space to make it what screen quite cleanly on the screen for the footer we're also gonna have a footer so it pads things out in the screen really clearly otherwise it gets Bowl together and looks very ugly on the screen this one is called a height 4 footer in section unsurprisingly we're gonna say if our section is the table view number of sections minus 1 if this is the last section we're working with then add some space we can scroll down to little bit beyond 44 otherwise return basically 0 you can't actually do 0 you like it doesn't like it very much your return naught point naught naught naught naught 1 right in Swift the nice way of doing that is something like dot least non-zero magnitude that basically means 0 but it's not actually 0 because it doesn't like 0 / ah anyway that's the important stuff how many rows do we have in our section now if you remember we have three types one is on or off at one room one is a textbox that has one row one is a selection is a b c or d that has multiple rows so we're gonna handle those differently here so we'll say number of rows in section first plug that i'm working with will do let item equals active command dot options at our section and now we're going to say have we got a select come if we have we have as many rows as a select command has possible values to choose from so if it is like current directory home directory root directory some other directory that's for it'll return for for that value otherwise return one so we'll say if let's select equals item as a select command if you've got a select amount of work with then return select dot friendly values count so we have those four values return all four here then we'll say else if item is a check command that's right either on or it's off this has only one value a single row the checkbox else if item is text command again will turn one for all other values I'm going to do a fatal error unknown command type refused even understand what this means because I shouldn't be getting at that point you only really every three these things so regardless we're turning here why here as and bevore is ah so I start I'm using s and is in the same method here because this there's a typecast to select command and it succeeds or run the body of the condition as important because we have to read the friendly values property and we don't do that we'll get back a generic command option which has no friendly values we can't read the value for the other two we don't care what's inside there we just care is it a check command or text command we've literally there's properties we just want to say is it or is it not so it's different way of checking okay next up I've totally rose we have now where it gets complicated we've got a write code to DQ different kinds of cells and configure them nicely and show them on a screen and this requires making three methods one that DQ's select commands one the check commands and one the text commands so I'll start writing the method here there's even a called func cell for a command which their check command at some index path index path and a return a UI tableview cell like that so this is gonna be cool we have a check command go ahead and create one of those things I'll say guard let cell equals a tableview DQ's will sell into fire check for next part index path and do a typecast to our check hillier cell if that fails fatal error unable to DQ a DQ a check table view so if we're here we'll set our text able to be the command title got in line in the cell not headed inside the cell so I'll say cell text label question mark text equals command title shoot we can sieve or case-insensitive that's a tight at that label right there we also set its toggle switch is on value is it checked or not to be our command value what was saved by the user previously a question from Ricardo could have done if typecast is like on the yes you could have done using is is better just cuz it's what you mean is anything or not but yes you could have that of course occurring on this if-else chain green fire to switch you yeah of course you can do that you could of course you could I'm not sure to clear things up too much but of course you're them anyway so it's all good for you either on or off Spenny what the value was saved as and then importantly assign its closure we're gonna say cell dots which changed action what to do when a switch has been changed on or off this is a new closure with a weak self in and the value of the switch so tell us is it now on or is it off so we can know what to do and our case will say first make sure we have a check command to work with otherwise is no hideously wrong will say guard let check command is self question mark dot active command the options at index path dot section ask question mark check among else return now realistically that must always be true this cell has only been made because it had a check command at our options array at the right position however there is no harm being safe here they flip the switch just make sure do we definitely have a check command at the array if we don't just bail out so it's gone weirdly wrong run being safe but if we do have check command we'll say immediately our check command got a value equals the value like that modify our save value to be the new value of the switch and then outside the closure return that cell back return cell so it goes off to be used in our hey woohoo that's the first one done and the other two are very very similar we'll do text command next we'll do func cell for command text command at index path index path returns you a till yourself now you'll see these method names are the same cell for at self or at but they have a different parameter type list as a check command this is a text command we're overloading the method so swivel choose the right one depending on what is called with it's a nice way of working just like before we've got a DQ assail do it typecast make sure it's all good it fails we'll do a fatal error so guard let's sell equals table view dot d cues will sell identify ur-text wind XPath our index path ask question mark a text table view cell else fatal error unable to DQ text table view cell like that again we're gonna have a closure so I'll do cell dot text change action equals weak self and the new text value in so change a text call this method saying exchange action passing the new text value just like a forbids we have a text command to work with must always be true but it's not on being sure guard oops guard let text command equals self question mark dot active command got options index path lot section as a text command else return should never happen Michael Stram you do the same check I don't mean my same check like I've been us twenty seconds ago or a minute go if you clap what you mean I'll answer the question again text command value is our new text so when the tastes been changed either sale update our command with that new cell now when we use the placeholder and keyboard style we configured in that type of command we can say if command dot placeholder dot is empty so there was no place over attached we will say cell dot text field dot placeholder is and the text a sensible default else cells text field placeholder is the commands placeholder they'll say you know the file in the search for all these able to own that be in a placeholder box will say cell text field text is the command value there's a predefined value look with the text file of alt or what if modified themselves later on using our little closure here put that into our text field and then we'll say if the command is numeric modify the text fields keyboard to come the command key e cell dot text field dot keyboard type is decimal pad but it's numbers on iphone else a text field keyboard type is default like that okay so that gives us a function to handle checking stuff like on/off a function to handle text like that the last type is when there's four or five of choose from so it'll say do you want a B C or D so it's another thing we'll do funk cell for command a select command at index path index path returns that you help yourself let's sell equal table view dot DQ select for index path there's no type class required here this thing as a regular table you sell its text label text it's going to be our absolute a command pulled a don't we so we'll say that command equals what we're saying before I'm sorry there's this four have been passed in right here I'm being silly sorry cell got a text label dot text is command dot friendly value that friendly values index path row if you remember the friendly values and the actual values would map to things like current directory root directory home directory hey its pursuit directory I did so did well done Craig turn cell so we're gonna take that and put into text enabled like that but in a given section of stuff ABC or D you can only have one of those options you can't like search my directory and something else it's always or so we'll say if index path dot Rho is equal to the commands of value if it's the role it was slated in the command then every type should be checkmark else yesiree type should be none so only one in the section is checked at any given time and at this time returns cell that so forgive us now three methods was a DQ each a different kind of thing you want to have in our program we're now going to map those three into Apes or parent method self or at will say okay here's the command it's a text command use self or c'mon text command so look at the three options and choose which method to call inside self or at so self or burl at its base let item equals active command herbs active command dot options index path dot section and now we can say did we get a section command a select command or not or a check command whatever and pass that into the write method being used now we don't want to do is use the is check here it's a typecast check because they expect to receive a select command or a check command or a text command not a regular solve command option so we'll say if let's select equals item ask question mark select command then return cell for I select sorry index path else if let check equals item ask question mark check command return self or check index path else if let text equals item ask question mark text command but self or text at index path and everything else fatal error unknown command type again if brushless never actually happened there's no harm adding in so at least you get it wrong in the future it'll tell you very clearly what you got wrong so that method brings together the three we just wrote it'll call either self command set command check amount or text command depend on every command option you have inside that thing so it'll do the right thing next we're gonna implement did select robot i've chosen one of our cells what should we do now in our case as I've explained that that command and a text command both aren't really selectable we've made their sessions I'll be none we don't really care when they're tapped we care when there's text typed in or when that switch is told we don't care when they said itself is tapped at least not at this point if I was the finish his appetite he would make it do that because you also have our cells as highlight the text box madly but you can think that later on anyway we do care about though if we are a select command if it's a or B or C or D would tap something well I'd do some work here so the first I'm going to do is say table view dot deselect row at that index path animate true otherwise it will stay higher than grade of tap there's nothing to look great you are tapping it and it fades out again straight away next we'll make sure we have an actual select command here we don't care about check commands we don't care at text commands only select commands so I'll say guard let select command equals active command dot options at index path dot section as select command else return ignore all other types of stuff now as a reminder we have to use section here because our sections store whole groups of stuff so a section will be where do you want to look for files and the rows will be here here here or here or there wherever it is right so the command itself a select command that stores all those friendly values is a section of our options not the rope oops so now we are now where have our select command the one they chose we can go ahead and say select command select command got value they've chosen a new option for this search criteria for example it's going to use index path that rope which value did they choose of our four or five options which one do they actually choose save that away for later on and now most importantly update the UI unselect all the other options that weren't may have been checked and set the one that was checked needs be territory so I'll do for sale in table view dot visible cells only one thing actually see first make sure we have an index path for this which we don't always it should do but iOS is funny sometimes humble say guard let sell index path equals table view dot index path for some cell else return it's possible that cells in a reuse queue we can't get it out somehow there's no index pathways yet anyway we only got we don't care about it bailout we're also gonna make sure that this thing belongs the same section as a woman has changed because Possible's like do want a B C or D section break that do want a B C or D for a different option we don't want choosing one here to affect always ones down here why step only the ones in its current section so we'll say after that first check guard let one scroll down guard let index path section be equal to seven and xpath dot section else continue so don't modify cells outside our current section if we're still here it means this cell belongs to our section and it's currently visible so we'll say cell dot history type equals none deselect this thing outside the loop want to decide all the things in our cell our section we want to select the one they just have so I'll do let's select it equals table view dot cell for row at index path then selected question mark dr. Sri type equals dot checkmark so mark that one as being checked just happen it oh it is angry it was no no let here sorry boom my mistake okay so it means when a cell is tucked uncheck everything else in this section and check the one they chose and nothing else we're trying to do here there's no point come back in area I'm sorry there's no super chance yet you can come at me I'll shake the bag when you're ready okay anyone gives you guys way okay alright that completes I think at least for now I'll edit command if you control a screened its come together quite nicely I think we're going to now is show that when in the truth command view controller we're going to say indeed to select here right next path this thing right now they add show running programs or show it scrolling window we immediately go back to the main screen we no longer want to do that we want to show the next screen okay you've chosen find what you want to find and again the little shortcut here has happened more more quickly that's alright so when a modified us think there's a new command finding stuff just lots of options for us to work with a really stress test our system so in choose command do controller here in viewed logo has two commands right now both trivial I don't make a new one called find and another new one called count so we have end up with four commands in total both of these two new ones have options for us to work with and the count we're going to use the command WC so if I go into here this is my PS or pipe less command if I do PS or pipe WC - L it'll mean count lines how many programs are running right now 517 that's why Oh max consoling maxed out well though it seemed mostly murex code right now raaah thanks Xcode anyway a lot of commands running right now you got a new - C 4 characters you can do - W 4 words and count them all the point is that there's a command here WC that counts words has three options lines characters are words that's going to be added to our program like an X code I'm going to say there is a count parameter I call it count 1 which is a select command do you want a or b or c the title will be count like what do you want to count the prefix there is no prefix here the valley will be zero so the first option by default friendly values will be letters then lines then woods what you want to count and the actual value to be an array of - see the letters as characters - L for lines and - W for words again we don't expose it to users hence the friendly values which is raps that a nice of string to work with so as the option you want to present to users or now rap that inside a count command by saying let count equals a command the friendly name will be count input words or lines the route command is WC with space its WC - l WC - C W - W if any one you want to count must be first this is false because you can count if you like and the options is only one that is our count one option so we're saying like a new command called count with that route command at either an option of - C - W or a - sorry ll w like that perhaps much I'm afraid not tax reasons that gets awfully dodgy but I'll think of you let's rock she gets treat all the time she's not a small hungry dog let's put it that way there's a simple test of our little program here is one thing there I had a more complicated one now with multiple options that really work uh system much much harder I'll make some space then say let find one the first parameter find is going to be a select command the title being start from no prefix value start from zero friendly values the current directory then your home directory then the root directory then somewhere else so for possible options the actualize beneath that well the current directory is a dot a full stop or a period your home directories are tilde the root directory is a slash and somewhere else I'm gonna spit in slash path / - slash your slash directory so it's pretty Clinton to replace that but with their whatever come and they want to put in said so that's the first thing where do you want to start from will add fine to this is a check command so that's the owner or situation it has a title ignore case should be K heads d'amour not prefix is empty no prefix if it's checked if it's enabled I appreciate ignore case the command is - I name like that ignore case search for a name a check command is just - name and the value is false don't ignore case by default our second one so how to select at a check let's do a text let's do find three is a text command this is gonna have a title of filename what's the actual file name you want to work with it could have stars or question marks to do what's called a glob a broader search or be a hard-coded string up remind what it is there is no placeholder it's fine no prefix either a numeric no it's not the value is going to be like a sanity string Steph our name right so that's three things let's look at one more will do let find for is a check command this will have search subdirectories do I search the current directory or all directories prefix where this one is still an empty string if it's checked if there are search of directories that's actually a default behavior of the find command in the command line so other to an empty string the unchecked command will provide option for that will say but uncheck command - max depth in lower case what it's when it's checked when it's enabled there is no command may pass into it but unchecked to search the current directory we do map max depth one and a value here will be false so by default to search current directory and we'll just do one more let's find five equals another text command with the title owner user name prefix is empty I probably know this is why sure is quiet my mistake sorry prefixes where you do - user like that that's use of space because you've got a there provide a username like two straws we're gonna put - user before that silently so don't see it placeholders every string the Americas false value is an empty string okay those are the five options you want to create with our fine command it's a really advanced command I think the original version had eight with more advanced things again but we're out of time and it's already 8 o'clock this is a really long one anyway our fire command is a new command friendly name is find files by attribute the root command is fine then space massey first is true so it makes it it's the fine commands find stuff after you've done something else makes sense otherwise i've options it's fine one five two five three five four and five five methods going out is it shouldn't be the lines wrap i'm it anyway sorry another what you mean the lines should wrap on my x codes we shouldn't go out anything anyway that's our command so now i'm gonna add those two to our array by saying commands dot append count and commands got append find like that so now i've got a loader extra commands here is the moment of truth after i can our and three course of typing when i press command R will this actually work or not this requires some booze let's find out sighting times press + there's our four commands well I choose cat input words or lines that goes back to the first thing again which is wrong idealist or attribute yeah okay so it hasn't quite worked that's right my mistake the problem is I think about it we haven't modified the way we're creating yeah sorry yeah because cross didn't actually work they were afraid of it the problem is that we have to modify the way we select the command so in our choose command controller here there we go so problem is that we have this thing we say this select row at here we add it to the array and pop to the root view controller straight away and that's not only good enough because now we have extra commands we have to actually say if we have options to work with then let them edit them somehow otherwise you know pop back to the root view controller so that's what we'll do really we all have a say if you look at it in this view controller again when we're here we can't do end it with them either hums that also sucks so I'm gonna fix those now heard of you controller Swift we have self write DQ cells and staff we need to add below that did select row at so chosen of row what you want to do with it in our case we wanna read out the command and show our new edit command view controller so I'll say let command equals commands index path row and if this thing has options is it if there's worth whilst letting this thing so if not is come a command the options dot is empty then let VC equals an edit command view controller with the style grouped VC active command is the command that is chose and the raishin controller question mark dot push your controller vc animator true so in theory in theory that should let me edit the think right let's find out we'll put out shortly okay so now we have they say there again I press plus choose five files then press find files boom there we go actually wasn't correct this time so now you see here's our check box of stuff we can select through quite nicely that check box here on or off a text box I'm going to say the file name is hello dot txt and then though directors whatever and other name is two straws that's worked quite nicely could see what all different kinds of things being shown there in one place I said what doesn't do what he ought to do work around is that when we when you choose you know counting put words or lines it shouldn't go back to the main view controller thirst it should go back to the other view controller where you can edit things move the turret or a bit please where would you like it over the chat window and haven't got lot of space it Mikaela um so I've got a fairly large screen but larger screen anyway I put it that in pirelli way to modify its when you add a command we push onto the view sack straightaway and we'll do a bit of a hack for that will work around so in truth grab your controller we have this let robot we just call command added straightaway that is okay it's important we want to do really though is say here if command options thought is empty then fine pop the review controller it's a trivial thing as no option is to trigger just correct them you can do new controller but if there are options show them immediately let them customize options immediately so I'll say let VC equals the edit command view controller with the style grouped it has the active command off the command is added right now and now what I'm going to do is replace our navigation controllers view controllers now you don't have to do this you could just put onto the stack both options look a bit iffy um but you'll see we'll say first get the top of your controller we will do if let first equals navigation controller dot view controllers dot first that will be our main view controller our original the control with a label at bottom pull out the first one will then say navigation controller dot set view controllers an array of our original d controller plus our new view controller animated true so animate in the new view controller sliding in while also destroying the second view controller I'll see how it looks now for press command R it should look okay it's okay it doesn't look great looks okay but there you go so here's our first view controller I'll press add we're actually a simple one like list of running programs back to the main screen as you expect but now to complicated one like count if it was all lines the new things slide in I'm gonna go back and back in the first view controller again so it does a replacement with animation and it kind of works here it's not really required I let me up set your press add there and back the preview controller either one works but the give a try anyway at this point we can now add commands to our program you can see we have list of running programs then count input words or lines so this is kind of working together we want to do really is to make the poem actually you know work and that means replacing summary here with the actual summary you know find hello.txt or count characters whatever it is and this bit the bottom the label we want that to show the actual unix command they should run to get these things happening here so first up in our command we have this summary computed prophecy and this returns back summary here that isn't good enough we're gonna say if options is empty then return nothing at all there's an empty string it's a simple command that are no options if the options are not empty go ahead and combine together a rough idea of what it means we'll say the first value is something like find this filename or search by carries whatever it is when they use that title backed up by the option to actually chose so we'll say let title equals option zero dot title an extra what's put after the title is an empty string and what we're doing when I dig through the various command options and decide which one to use for the extra and that you could of course put the whole thing and there you could say oh yes look for Kate incitive this file name this username owning it from the home directory you can put a whole thing and everybody wanted to hear I'm just gonna choose one of these things so we'll do if let's select is option 0 the first option as a select command then our extra value will be select friendly values select value dot lowercase so say something like search for file name hello txt and we're turned back the title of the thing search for file name and our extra value like that that's it for a select command if we our text command will say if let text equals options 0 as text command then if a text value is empty if they have no text search for no use any working with then we'll do extra equals no value set else come on else else extra is a text value so search for this family what is that value actually is and then regards what we choose we're gonna say return our title and our extra again and finally if let check equals options 0 as as a check command if we have a check come out great if check value is true rotella title return look for the sink otherwise return don't that title lowercased so it flips it around fairly trivially and that is a better subtitle if it's none of those things you could add a fatal error to catch if you want to order to do an empty string I already might be do so it should make a surprised look look much much better let's try it out so our press plus and do list all running programs no title there then do count input words or lines I'll do count words everybody back okay a camper were the lines count words so it's pretty close in the words option for that she were to edit that to be lines and go back again count lines so it just gives me a little summary of what the things trying to do only using the first option though you want to expand this and have all the options coalesce into one string it's your program II do you like the next step is to make our commands output themselves so you see we have this label of and alluding I'm sorry there's no sleep which as we know make our commands flatten themselves down so when I say list all running programs it knows that means PS aux or something else so it knows how to combine down itself into something bigger then you pause that string so to fix that we'll go ahead and open up command swift and write a method in here called output and this will come flat on its command down to a single simple thing so we'll say funk write output return the string around a little bit first our output is an empty string by default will then say if our root command is not empty if you have a route command to work with we don't always do in our examples here we do we'll say output plus equals our route command so that might be PS aux or something else next we'll loop over all the options we have and write the output for those options one at a time into our string so for items for item in options output plus equals a new method called write output for the item and add a empty string at the end like that and then return the output then we'll do funk write output for a nice image the command option returns a string and this is going to go through every possible type we have check command text command and select command and flatten its values down to a single string so let's say that root equals our prefix so if we have you know - user we after one of these things add that now that is fixed next we'll say what's the actual value inside these things and modify our command based on those things so we'll say if let's check equals item as a check command if we are a check command awesome if check got values if we are true then have we got a values add will say if check check command dot is empty return an empty string there this thing where it's checked does nothing at all just bail out otherwise return our root string backed up by our command dot check mud like that thank you very much Matt I'll hopefully give the dog a treat when I get another one otherwise they get very upset when one dog it treat knock-knock command there it should be check if I check Amanda like that so if it's checked and it has text add it in otherwise said map blank if we're not checked else sorry else and if are checked unchecked command isn't empty our command is empty there are 20 string so the opposite or we're before otherwise return routes drink backed up by the unchecked command like that so return either a check command all the uncheck command with the prefix or wouldn't be strength depending what was actually worked out and that is if we have check command selected if we have a select command it's only one of those possible things this is much easier we'll say else if let's select equals item ask question mark select command then what to do is route to that actual values array with their value attend that to the prefix so we'll say return our route string backed up by select your actual values select our value so whatever they chose for that thing boom and finally if they have a text command we'll say else if let text equals text item as text command that then Mitchell isn't not a lot of spaces because they enter in like search user name - space space space space space in case it wasn't done that means it will think it's nothing at all or they remove that and then check up to empty or not we'll say let trimmed equals text dot value dot trimming characters in dot white spaces and new lines if trimmed dot is empty so this has no value other than whitespace return let me string otherwise or turn our root string backed up by our trim string like that for anything else another fatal error unknown command type no idea what that is never get there no harm being safe so that those code that that code there is enough to make every command flattened itself with a lowercase a there every command now knows how to flatten itself and all its options down to a single string now we're going to do is write that output in our view controller individual it's Swift I'll make some space below command added and say func write output I'm also going to do is go through every command check it has some text and add it to the output so if our story caused an empty string for command in the commands we have let output equals command write output so flatten yourself please come out and now if not output dot is empty we have some text in there if we have something in our string already it means we've already flat in one command so we can't just say put that into our string we will combine it with our previous command with a pipe symbol that is shift back spat back slash on my keyboard other than your national keyboards but for me it's shift backslash we're going to say if not stir dot is empty we have a value in there already first trim out all whitespace loosed Oracle store trimming current is in white as new lines stirrup plus equals two space pipe space that's the way unix commands commands together do this pipe do that pipe do something else pipe something else so a space pipe space then after that stir dot append our output so the Pens the new commands output after the loop what everything's finished we'll do one last trim of white space make it as short as short as possible we'll say let our command equals stir trimming characters in white there's a new lines and now if at this point if the command is empty we're say hey is the first on the apps running tap this thing to get started otherwise show their command so if command is empty output that text equals tap plus to get started else I put a text equals their command like that and now the fit of the entire project will bring well at quarter past eight we're gonna call write output when our view appears we refined view will appear up here we will add a table and then call write output like that in theory that finishes that program let's find out I press command R and I'm gonna press + and choose find files by attribute from my home directory ignoring case hello MD and search of directories owned by two straws their breast back and they'll sit down here fine from tilde - I name hello MD - user two straws perfect i press + and choose count words or cut lines like that and now we see pipe WC - shell so that the crown will do is search in my home directory for all files called hello MD owned by me and count how many get found this command if you don't know the terminal is probably completely mind-boggling that's the point of the app the app you just say I'll find files for my home directory and count how many you found it's a much clearer way of working and I can add more and more and more things to say you know output a scrolling window and now it's pipe less and add more and more and more and the original version I had I think eight or nine or ten more more commands and then work with with more options but there's more enough for now I think quite frankly I think you'll get the idea and that in two hours I think our longest project yet and it won't be long is our application we've gotten to I think a fair chunk of tableview stuff realistically I think you want to add from here your biz to move cells around to swipe delete cells you'd want ditched a class thing as quickly as possible because we're sharing commands and that's a really really really bad idea because they'll override each other in confusing ways the only structs if I had more time with uncodable they lose I didn't codable here because it's actually some rising ly hard to do code before this casting um Matt Mick thank you very much it's very kind but definitely some doctors think I'm back in a second now because Matt's giving some money as well area yes or doing codable here it's actually surprisingly hard because you look at our commands type here you'll see they have an array of command option which is a protocol a smuggler thank you very much it's a rare command option and command option is a protocol so codable has no idea how to decode these things doesn't know where it should be a text command or a check command or a select command so you oughta do quite a bit of extra work to decode protocols using codable there's no way of doing it by hand so that was in the original draft and that was about our explanation I trimmed out by going to to doing it all in code instead and using classes round struts so it causes problems and that you will find your class overwrite each other regularly which is really annoying in this project but I mean the fix is trivially enough fixes you know when you one more into choose command view controller when we call command added you want to copy that command instance a deep copy using NS copying at that point and that wait what override each other nicely so you have slightly better off it's still annoying to still classes rather structs but it's better that's the main thing dogs have not come they came again and again and again when there was no food and now they get treats I get loads of treats they don't want to come outside to buck each other for a while I found that Sammy ads are quite barky breeds um so lesson learned there oh hello come on Alina good girl right come on okay hello oh okay heavy for the trees right you get you got at least two trees you got some generous donors who liked you very much turns out so yes you get two treats yeah oh yeah wait your turn bad dog wait Phil stop right I'll still let's put you on a big screen signal all admire your fluffiness there you go that is from your friendly friends on the internet they do like you too heavy oh you are so heavy good girl you get two treats as well cuz you been a good girl you can see a little bit okay alright anyway the main app is finished now if you have questions about the app about anything swiftie about dub dub DC's coming up real soon now now is your chance to ask me anything you like go ahead I will hang around for a while it's already 20 past 8:00 but at least till we finish glass of wine now I will answer questions any questions I can help you with okay yeah I'm glad you like this I think I'm more advanced app certainly a more involved out as I think like really advanced here took out all the codable stuff it was struct posting a values and stuff get links down I think we take the advanced here we have delved I think more into you know table views of custom cell types and similar and that's always fun to do yeah so life coding is an interesting challenge I mean it is yeah because I've got to think about what I'm doing right now myself as a coding and also talk about what I'm doing explaining why I'm doing this we're not by the way and also try and read the chat window for questions coming in so there's a number of things all at the same time which is challenging right you know it's hard work so it's difficult to do I would say that hopefully folks have learned not to ask questions random things um during talk which really helps so yes that helps is testing oh sorry I started Stephen mr. question there I'm sorry Stan Stanley yes Dakota be available it's happening it'll be up up as soon as YouTube has a stream up which would be in a few hours I expect all tomorrow usually problem is I out the first bit on YouTube the countdown timer thing when do with live streams I take some a few hours to do is offer that push the code to github immediately and then a little stream where that's available I'll tweet it out something about how do you use a variable another function where I set another function Stephen you can't don't use properties for that if you have to also asks am i doing testing in 100 Swift no testing is attacking with Swift briefly and it's its own book testing Swift it's a big topic to get it right Robert and right track Pete with kilo no Kyle's amazing Kyle I've got Kyle speaking at my conference I'm flying him out from LA to speak at my event in July I wouldn't agree with Kirilenko he's great what's my relationship with number 26 I have literally no ratio at number 26 it appears briefly in some tutorials because when I first wrote them could I thank you very much when I first wrote them tears with was 26 at a time so what I did like person named Pierre Swift age 26 so he's gonna use a fair amount because of that Paul your settings asks am i excited for a pate return types I am and a swift 5-1 feature that I have so you love if you look I think I still have I put on my screen turning again I still have Swift 5:1 here because it's so good and that's one of the major changes is that feature a picutre types I believe you know my best guess is that we're going to see swift 5:1 shipping in beta form next Monday in Xcode 11 you know a school 11 tap is happening io 13 is happening and swift 5-1 I think it almost doesn't happen with those on Monday do we do soak lecturers have all right dimensions as well Josh you can use them there as well so the same thing Michaela I use Zed shell or Z shell they I find it more useful more flexible or powerful I used a setting called Zed presto or Z presto to add features to set shell to make all useful to me and it's a great add-on behaved eternal power user then look at that shell Isaac asks what am I most looking for about BB C for me it's mostly meeting people I love meeting people you know obviously I look forward to seeing you api's improved Xcode you know I really hope that using marzipan for unit tests and iOS so I get Mac OS years has speed early tests much faster that'd be super nice I hope that happens but it's meeting folks I love going out there meeting folks you know get coffee get food whatever have breakfast just hang out meet folks if you aren't dub dub and you what kind of say hello awesome I love saying heard folks all I ask is please three things tell me your name so many folks they were hypo I love your books and ever and no give me their names I don't want to call them one it seems later on tell me your name please if I've met you before tell me where at your for because I meet literary thousands of folks every year um and I've walked past my own brother in public right so I mean uses with names say hi Paul I'm Bob we met at Dublin last year great and third if if I'm going somewhere else I'm not being rude I rate having lunch or coffee or a date somewhere whatever it isn't and invite somewhere going somewhere else I will come back to you and we will talk I will find you and we'll get coffee or go through code whatever I will find you but maybe not right then if I'm walking with someone else to somewhere but usually going for lunch or coffee I don't want to say oh sorry I just took this other person for a while I'm not being rude if I can't talk to you right now I'll talk to you later on I will say it to you and wait lunch right now are you free later and you know tweet me or email me at more range of date but I do want to hang out with you or not say hello just give me a name tell where you met and don't be afraid if I'm going somewhere else already otherwise you'll be annoyed Robert you ain't killed adrenaline why screams I think it is much longer life than me I went to one two weeks ago where it was see a billion app from scratch and complete doubt and shipping it to the App Store and I went through a few hours and went bed it was oblate for me madness ask to have any cope using paint code as a sprite and sprite kit you could probably use s case shape now couldn't you right I use my above and paint code in unwrapped in a UI Bezier path my locals busy a path from paint code that's why it draws stuff in the app and that straight and pink coded the Bezier path I just place him to Bezier path and put up your eye view using see a shape layer so it's bet you can use SK shape node to do the same sort of thing Steven do I always come apart yes I do they're very helpful Alex a next-gen such don't have the beat you know honestly my knee social-networking give really really small hum I use Facebook specifically gives my grandmother uses Facebook she's nighty story or so she was Facebook she wants see pictures of my kids I just put for Facebook for her all I do this is why you know almost no one I are my friends on Facebook only family members because it's just for doing pictures for my mother and my grandmother so yes I don't have much need such networking a sure my Zetas theme it's one of Zed press those defaults here was cool but it's part of the default actually if you're still upset presto you'll find it zedd presto that's why use more hello let it go you get over here there come on ok I work concurrently so hello try that over here ok Safari is very unhappy you're doing mock windows right now yeah sorry I lost a plot ok cool ok so very upset presto look Co grabs it press down and use that you'll be fine news than that yeah yes Wow safaris were really annoyed anyway said presto but but but uh and lasting there's no answer I've no he's lasting so much sorry that's not actually true use it once and hated it because I was I was teaching someone as mentor someone and they really wanted use elasticsearch I was like ok fine let's use it and then we're doing something trivial and really small and they ended up with a four gig ram cloud virtual machine and i was like we're not gonna pay for that it's pointless for a really trivial thing that we paid for anymore yeah it's not that it's safaris refusing to let me even drag out a tab in the Safari on Greg's house I'll show you that president anyway so yeah it's it's I'm not big found let's search if I'm sure it's great for many other things come on Safari you can do it draggers have out try to have out nope it's gonna do nothing at all absolutely to Safari but if I oh yeah as far as based he has given up the ghost excellent yeah as far as giving up marvellous anyway let's ignore presto and um I see what works fires tried type into here just look for Wow safaris really gone nuts cool okay don't oh it's a really bad ad with a safari right now oh right presto Pete are easy t.o.p are easy TL gonna look that up and Google that and you'll get dead presto which is a great tool sense to do the show Brian Vaughn says all right you iPads very bored fine great good Brian I mean fine I don't mind no I obviously you you one you like to do so yeah that makes you happy using storyboards you storyboards you want to do a code decode well what I ask is folks know how to do both so when you join a company and they say are you storyboards or we only use code you fit in because they will not take kindly to saying sorry I don't you know use that you'll do it my way or the highway I never goes down well but if you're the binary monitor which when you buy well I have the LG of the fine 5k right now it on its last legs it's really not happy I can't showed you because of the way they obviously can't see it but I've gave LED ghosting now which is very annoying because i zoom in on my screen I can see a little bit ghosting around there it's always like the Apple icon corner or their spot like on a tri-corner I got ghosting there now just very annoying it's not strong but it started to get worse I'm hoping imminently Apple announced a new iMac Pro I can buy one of those things and put this thing behind me I'd be very nice lucky why frankly but we'll see we will see what foe is my daily driver I don't even mean sorry I use an iPhone 10s Mac's nothing you mean I like it very much it's a good film didn't wait is mind you right walkies excellent lost my phone did my watchman find it ah it's buried on my desk somewhere oh there it is there we go one of these bings great devices love it anyway any more questions by the way if you bought any of my books I hope you have you have seen lots of updates come through for those books boss with five it's mostly minor changes there so fives a great release but you know the the the key changes in there I'd like to affect your projects that's your very specific needs like you know raw string or something so there are face of updates but I've got so many books now just a lot of reading to get through particular the hundreds of Swift it was quite intense world perfectly but as of tomorrow I'm almost free if you want place to do and then I'm kind of free for a few days to migrate my server to a new server and then dub dub I fly and Friday I can't wait do I think Apple up they happen to be again yes I hope so I hope so because you know it's a great device you know like my kids love it we've a bit consumed all their TV through Apple TV because it's simple right you know there's no complexity for the able to use it we used to have you know cable controller that's had a thousand buttons on it and they couldn't use at all just as a good thing um but now these Apple TV and they can talk to it and they can press buttons and it's more easy we use that act of a lot what they would change I don't know it hasn't been a hit let's face it so there's no need up the hardware be more powerful just yet zero shame spawn go it's a single track event you will see all talks as only one set at or capped at any given time there's not multiple talks so you'll be fine yeah the madman is great and I think if I didn't have to get rid of new screen at the same time I would definitely switch to a Mac Mini premieres I'm really tired having dongles galore on my macbook pro cuz this thing connects to my 5k screen it's that 27 screen right account to see if it's a big screen and it only has USB see there's no USB a on my screen for no reason whatsoever the iMac Pro has USB a and USB C and there and and and there's a multi devices connectivity so I won't have my mic Pro really I hoping we'll get a decent bump but regardless I'm getting worse with his bump next because I need one it'd be really nice because things get all this too and a good old notice thing so it needs a replacement I'm gonna do Cora Mel so what I've done so far I've done a video called core Mel for everyone was a crater everyone on YouTube which you should watch to be a long time to make that video watch that video that's my best attempt explaining how core meld create little work right now it's in advanced iOS 2 and and in practically I was 12 I've done one Sunday's live stream so together there's maybe five projects plus detailed technique thing of that YouTube video so I think that's enough for now babies do smaller I'm not sure yet we'll see all right you're excellent do any book stress to your social networking code what a result nil ii don't i they ought to I don't I know that and I want to do that I'm white got my planet place that is she I'm afraid so hopefully hopefully soon we'll see I had such a lot of work recently with them the whole is Swift and the book updates and similar it's been relating this for a lasts or four months or so so I get a few days off between here dub dub I wish might be doing my server update yay and after that of course gets matter he game within your updates when I was 13 and temple 50 that's similar so it's no break of the rises sued to do that kind of book by hope I was a good I really do want to do I use docker only what I have to which is Linux tough but balding though can your apps outside Apple to be no you cannot it's not designed for I'm afraid perhaps they'll improve that in TV OS 13 I know we'll see I think I don't even know one can auntie verse 13 everyone's saying you know multi witness of an iOS great dark mode iOS great well we have dark modem on see us already there's gonna be bounty for us but what we get no we'll see so who knows who knows any more questions why is a pelagic a are so hard Apple are definitely 100% working on multiple AR skunk works projects multiple I don't know what the doubts no one does I'll have my folks in the secret building in Cupertino not in a lot of that you know rebuilding but probably glasses or headset something like that no one's quite sure yet what is wasn't announced but it's gonna be big everyone has the same thing that AR kit it's wonderful it's super clever it's super easy but it's just so weird and annoying having to hold your phone up no one wants to sort of do that we see folks holding up you know iPad pros it looks weird right so it'll get better I think we'll see we'll see I think I have a cat allergy Simon is why I think the out seen the cat yet okay the cat I do but I do a site called as of this morning which is great time for double D see we'll see we'll see anyway why do kills everything any more questions by the way could have streams all over over two hours it takes YouTube longer to pair the replay and it past two hours takes about an hour or two what you'll see is it it trims the beginning randomly it just jumps halfway through but eventually they do the whole thing it'll end up being you know two half hours whatever actually is the full length but for now it's a little weird last chance of questions if you have questions of course you could tweet me I have two straws you can join the hackers of slack group to ask questions there you can email me if you must I am poor at hacking was calm be warned I have a massive email backlog all the time focusing out emailing me again saying wandering back the first email so yeah email isn't ideal six cat yeah honestly I we had a cat for ten years before I realized as a loaded term because it's a long long time for the allergies to build up and that's a point where it's it's pretty bad yes regarding extreme Rob I don't know what it is I have no idea because you know I've been so so busy for the last four months since ferry the first that you know double gets really really busy you'll see me putting out a lot coming to another week stacks of stuff really busy time after that there'll be a long trail of you know still good content and when it slows down I need a break I hate time off from doing constant Swift so I'm gonna ease off some day streams for a while certainly until probably August I also do a conference in July as well so it'll be a while my next Sunday stream which is why it's one nice and hasn't listened long less wine get out of town if I'm gonna be ill might be happy until we're all unhappy Anil I always loved dub dubby see it's hard not to it's so much fun it's so exciting you meet all your friends all buzzing about stuff you learn so much in an hour sometimes at the right lab yeah it's great fun great great fun how do you just tap the home button you ain't what the homeowner gets riled up because you'll get told outpatient words the background in your app delegate we tried to share my screen again here we go you'll get told dinner in the background there you are leaving the background what you want to do that's your chance to say save data or whatever you want to do there take their EE because you want you can monitor what of anywhere if you want to do it there get an observer for the exact event if you really want to but um whatever works Jay Pratt it is not older to say the silly thing to say see itself escape from B you didn't already know Bell Labs be all right folks yeah all questions done I will see you I don't know when you're gonna see stacks of videos for me coming up you know imminently but not live stuff I expect I might do one special one maybe I'm not sure if anyone at some dub dub will figure it out otherwise chemist me live at happy to have live if you've not already liked the video please like the video it helps me helps you helped everybody otherwise I will see you well next time whenever i Tubbs okay take care folks bye
Info
Channel: Paul Hudson
Views: 7,319
Rating: undefined out of 5
Keywords: Xcode, swift, programming, tutorial, live, project, UITableView
Id: OLjkmJNNeHc
Channel Id: undefined
Length: 147min 25sec (8845 seconds)
Published: Sun May 26 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.