From the course: iOS Development Tips

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Special parameters

Special parameters

- [Instructor] We've all used and made functions with parameters, but are you aware of everything you can do with them? Let's look at some special cases you may not know about. I'm going to assume you're familiar with everything going on in this function that I have up from the exercise file. We have two parameters used in the function, and a value returned. Now, let's suppose I don't want to write diameter every time I use this. I can use an underscore to remove the word. And I'm going to get an error message that says extraneous argument label diameter in call, and if I click it, it says I can just get rid of diameter, and I'm just going to use that as fix, and now it's gone. Now, what if I want to say something else like that? Is that this a here doesn't make any sense for what I'm doing. I'd like to call it height. So I can actually type in height here, and I should get another error message saying that it wanted…

Contents