Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
So now, I'd like to show you an example of how I've used the Testbed in this application, so you can get an idea of how to use it yourself. As I mentioned before, when I have a specific task to accomplish, I'll start with the Testbed like this one and do some prototyping to figure out what approach to take. This is an example of a task that I needed to play with in order to understand it well enough. So, let's open Testbed-dates. The project is in the Xcode project file, and I'll double-click on that, and that will open it up in Xcode.
And if we open this up to the source code here, you'll notice in TestbedViewController everything else is the same. I'm just going to get rid of that so that we have a little room for the code. In this runTest function, you'll notice that I have a bunch of date testing codes. So, I have Testbed version and then date testing. And I've got a for loop with a boxed array of strings. And then for each of those strings I'm converting the string to a date format and then I'm displaying that in a number of different date formats. So, let's Run this in the iPhone simulator.
You'll notice that here are each of those dates and in each of these different formats. And so, I'm able to play with my approach for how it is that I want to accomplish this task and see the results in real time here on the simulator screen. So like I've said, the Testbed is a useful tool, it's not an essential tool. You can use NSLong for the same purpose. But it is useful, and I use it a lot in my iOS development work, and we'll be using it later in this course. I hope you find it a useful tool for your projects as well.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 98327 Viewers
61 Video lessons · 85625 Viewers
71 Video lessons · 69566 Viewers
56 Video lessons · 101898 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.