1 00:00:01,700 --> 00:00:10,160 In this lesson we'll talk about a very simple UI outlet called a stepper as I use to increment or decrement 2 00:00:10,160 --> 00:00:10,860 the value. 3 00:00:10,880 --> 00:00:15,460 And then based on that we can do all we can decide about what we want to do. 4 00:00:15,620 --> 00:00:18,580 So let's go next quarter and see how are going to use it. 5 00:00:19,890 --> 00:00:30,750 So Scott let me close this Commanche then single view application on what I call it a step up 6 00:00:35,300 --> 00:00:35,890 step. 7 00:00:35,990 --> 00:00:42,910 I'm going to go through this storyboard in the storyboard I'm going to have a stepper and then I'm going 8 00:00:42,910 --> 00:00:54,070 to have a label that is going to show us the value of the stepper and I'm going to have a system for 9 00:00:54,290 --> 00:01:04,520 the top mind HPR get rid of all the comments on in here say this is my step. 10 00:01:05,940 --> 00:01:16,590 This is Raz label as always and this is the step action and remember it's value changed because the 11 00:01:16,590 --> 00:01:18,740 value of it constantly changes. 12 00:01:18,960 --> 00:01:20,780 I'm going to side step. 13 00:01:20,860 --> 00:01:23,780 IT'S ACTION. 14 00:01:23,910 --> 00:01:25,630 So that's about that. 15 00:01:25,680 --> 00:01:29,350 I have two outlets and I have one function. 16 00:01:29,550 --> 00:01:32,670 Let's go Word that and get everything we need. 17 00:01:32,670 --> 00:01:34,900 So they call this cleaner and nicer. 18 00:01:35,130 --> 00:01:44,790 And then in here I'm going to go ahead and say every time that a step action happens say red label the 19 00:01:45,070 --> 00:01:46,920 text becomes 20 00:01:49,860 --> 00:01:53,460 and has a strange string format. 21 00:01:53,610 --> 00:01:55,260 What's the format. 22 00:01:55,260 --> 00:01:59,430 What ever you find of that type float. 23 00:01:59,430 --> 00:02:05,760 I have an extra dollar sign in my stepper that I knew. 24 00:02:05,970 --> 00:02:11,080 Remember the value is a double which you can you know interchangeably used as a float. 25 00:02:11,220 --> 00:02:12,660 So let's see the 26 00:02:23,580 --> 00:02:32,760 now I highlighted that and I get this perfect and Art few really know simple things to remember is that 27 00:02:32,910 --> 00:02:40,420 even to us that pays is often used to increment and decrement by one you are not constrained by that 28 00:02:40,420 --> 00:02:40,840 figure. 29 00:02:40,880 --> 00:02:44,030 This step can actually be point 1. 30 00:02:44,070 --> 00:02:51,560 So every time it adds or add or subtract point 1 tweets and other thing that you might want to notice 31 00:02:51,560 --> 00:02:54,000 is that you have the minimum and maximum. 32 00:02:54,000 --> 00:02:57,570 So maybe you want to go between minus 10 to 10. 33 00:02:57,570 --> 00:03:03,260 Another thing is there is an author repeats by that end here which means if you hold the body and it's 34 00:03:03,260 --> 00:03:06,310 really cheap going up constantly on its own. 35 00:03:06,510 --> 00:03:13,240 And if you don't have the auto repeat that doesn't happen and the continuous works very similar to very 36 00:03:13,590 --> 00:03:15,960 similar to what we had in a slide there. 37 00:03:16,080 --> 00:03:19,510 If it is continuous then it constantly goes up. 38 00:03:19,530 --> 00:03:24,150 If it is not continuous It only does it when you let go of it. 39 00:03:24,150 --> 00:03:33,390 Finally there is there is a drop in here that means if you increment beyond our maximum it will go to 40 00:03:33,390 --> 00:03:34,200 the minimum. 41 00:03:34,200 --> 00:03:38,370 Essentially it wraps itself around the circle and backwards. 42 00:03:38,400 --> 00:03:45,740 If you do it go below minimum it goes to the maximum as if it's wrapping itself around a circle. 43 00:03:46,020 --> 00:03:49,440 And Italian mind I think that's about it. 44 00:03:49,470 --> 00:03:51,720 So that was all very simple. 45 00:03:51,930 --> 00:03:58,170 You get the value you decide what you want to do with their values and you know you can choose how much 46 00:03:58,170 --> 00:04:00,240 you want them to be. 47 00:04:00,540 --> 00:04:02,450 And the steps can be done. 48 00:04:02,460 --> 00:04:06,800 They don't have to be integers and the values are doubles or floats. 49 00:04:06,810 --> 00:04:09,280 So with that in mind that's about that. 50 00:04:09,300 --> 00:04:10,300 Let's move on.