so let's start by creating a new project and we will have and this project named as stopwatch the language is going to be swift and we are going to build it for iPhone but next and I am going to save it on the desktop so the first thing what we will do I will take up the landscape left and landscape right as I only want this application to be running in the portrait mode so we will set up the interface so I'll have this or you take orientation set to portrait here and the size is going to the art 1/4 inch so we need a navigation bar on the top so I'll have the navigation bar let's set the title to stopwatch then we need a label okay this size will do so let me say zero zero zero five don't eat yet just to see that how it looks like so I'll have a ten the middle and let's have the custom font Helvetica neue and I'm going to increase the font size there's something like 72 will do because then we need to have the two buttons so I'm going to say that let's add one button over here and let's add another button over here okay let's change the background color of the viewcontroller to something like crop table view background color and what I will do I will change the navigation bar background as well to bartend we need to change so this boat would look the same similar and then for the label view controller we can have the background to white color so yeah this gives us a bit of a differentiation okay so for these buttons I will be using some images so let me have my images over here so I'll create a new group sorry I will create a new group and let's call it but some images so you can download the images I have used from the resources section so I'm going to drag and drop my buttons over here so make sure once you are adding any resources to your projects or destination called the items if needed is always check ok so we have the buttons now so let's see this is for the lab for the reset for the start and for the stop so let's go back to our storyboard and for the first button I'm going to say that it is off the custom type I don't need the text and the image I can lose start and then for the other button again it is of custom type I don't need the text and the image I can use the lab so let's align both the buttons and then I'm going to select and put it here okay so these are our two buttons then we need a table view for the labs so we grab because we need the table view within part of our view controller so I'm gonna drag the table view over here so let me resize it okay so I'm happy with the size okay so now what we need to do that there we need to link our table view with our view controller so I'm going to ctrl click and drag to the view controller and I'm going to say that this view controller is going to be the data source and also this view controller will be its delegate now let's open up the swift file and let's do some linking so what I will need let's call this label as stop watch label so I've created an iboutlet then I need an outlet for lab table view let's have the two outlets for start and lab button so I'm going to call it say the same button we will be using for start/stop so that's the outlet and then this button we will be using for lab we set okay now for this button we also need an IB action and we are going to call it start stop and this is going to be an action and then for this button we will need an IB action and this is going to be lab reset IV action now we need to tell our view controller that it's going to conform to two protocols one s uitableview delegate and one is UI tableview datasource so the moment we do enter it's going to give us an error and it says that type view controller does not conform to the protocol UI tableview datasource so for that there are some compulsory methods which need to be there so it's looking for those methods are not able to find and that's why it's giving us the error so the first method is to book view a cell for row at index part and then another method method is table view number of rows in section there you go so for the testing purpose for now I would say that return 3 so there should be 3 rows and for the cell let's declare it variables all is going to be UI tableview cell and the style is going to be UI tableview cell style dot value 1 so value 1 is we will be having the text label on the left and the detail text label on the right so that's what we're looking for and that we use identifier let's name itself okay so I'm going to say that cell dot background color is going to be the same as of self dot view dot background color then you can say that cell dot text label dot text I'm just going to say that let's have a clap cell dot detail text label dot text that's going to be let's have it something like zero zero zero zero and in the end we simply need to say that they turn so so but this over all of the errors should go of it and as you can see yeah it's fine now so let's quickly test over application so here as you can see that end up in the table view it has loaded the three rows as we said that the written and three number of rows in section so and it is changing this the background color of the cells where it is finding some data but it is not changing over here so it doesn't look good so what we can do by selecting the table view and it should be having I think we can do it from here so if I say that the background is group table view background color so it should do the tread let's test it no that's not the one okay by selecting the table view again and let's put it to default and I think that's the one so let's change it to this one yeah this is working and a winter face looks fine