Viewers: in countries Watching now:
iOS app development is actually simpler than you might think—even if you're not an experienced programmer. In this course, Todd Perkins bundles the most important concepts in iOS into a quick course, explaining the development process in a visual way that people of any background can understand. No programming experience required! At the end, you'll have a finished app and a basic understanding of Xcode, the toolset for developing iOS apps; building blocks like variables, functions, and conditional statements; and interface design. You can also figure out if an iOS learning path is right for you, without a lengthy time commitment.
If you find you'd like to learn more, see iOS App Development Essential Training, Foundations of Programming: Fundamentals, or any of the other programming courses in our library.
In addition to the standard functions that we've seen so far, there are more complex functions called parameter functions. So, what are parameter functions? Parameter functions are a way for functions to have more versatility. What that means is that you can provide different input for the same function. In other words, you can perform the same process with different input. In a parameter function, input is called a parameter, and it's a lot like a variable. So, what does a parameter function look like when you create it? You add a colon after the function name, the received data type is in parentheses, that's the input for the function.
The received data variable, or again, parameter name. And finally, when executed, the function uses a colon and then the value after the name of the function. So, let's look at an example in actual code of what a parameter function looks like. Think of exercising. You have the concept of exercising, and that would be the function of exercising. But every time you exercise, you don't necessarily exercise for the exact same amount of time. So if you had an app that was tracking the number of minutes that you exercised, then you could send it, whether you exercised for 30 minutes or 60 minutes.
And the exercise function could then add up your total amount of exercise based on the number that's passed in. So the top two lines are executing the exercise function, passing in values of 30 and 60, respectively. The exercise function receives that integer value as the number of minutes parameter. Within the function, number of minutes can be used like a variable that's known only to the exercise function. And again, this reduces redundancy in code, because we can use the same function and have different input.
And so, if you wanted to keep track of the amount of exercise over a period of time, you add to it in the amount that's passed in through number of minutes. And just like regular functions, parameter functions have the same rules. Start with a lowercase letter. Only use letters, numbers, and underscores. Use camelCase. And don't use any reserved words.
There are currently no FAQs about Programming for Non-Programmers: iOS 7.
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.