Coding References


Paul - I wonder if you could spend a minute or so explaining what each new method or function does (I may be using the wtong words here) - I will give you an example. You used the “animateWithDuration” thing in lesson 1, and sped through it telling us what to enter. From my perspective, a minute or so telling us about the options around that would be very helpful.

Alternatively, if you do not have th time, tell us where to go to look at the full definition.


@JohnC Ok im going to take a stab at this one

Methods are basically actions you can take in programming. They are used when you want your code to do something.
What they do depends on how you code it, of course, and what parameters you include in the invoking of the method.

the animateWithDuration method does what it says, it does a form of animation depending on the parameters that you use. When you begin to type the method (methods that are already included in the apple API) it will popup with different methods using different parameters. To know what each one does, click the More link at the bottom.

Now I do not fully understand the time intervals and their definitions, but im going to google them and try to understand them.

Sorry if i’m confusing you, just trying to learn by explaining (:


Complementing @rajeejones’s answer:

If you press the option key and move the pointer over the method’s signature, a little question mark will appear:

If you click on it, Apple’s official documentation on the method pops up:

Clicking on the blue links of that popover leads to the complete class documentation.

(Although I must add that the official documentation is, sometimes, very confusing :smiling_imp:)


@JohnC Also, If you are on a Mac, it is Option (alt) + click


Oh, that’s right! I’m on a Mac duh LOL. I corrected my post.



I’ll have a lesson on methods and go much more in depth, as well as looking at the definition for all the parts.

Right now I want you to focus on getting something working, so that you can start to see all the parts that we’ll be learning. I didn’t want to explain everything in the lecture materials, unless you really think it’s crucial.

Typing in code and getting it to run is a big first step. There’s going to be a lot of questions, and I promise I will be answering them.

I’ll add this to the Q&A video, and provide a better answer to your question.

@Fernando has a nice reply on looking for the details, however there are issues with that approach when you have a compiler error.


Paul - I am happy that we get on with it in the manner you are doing. What I would like is a recommended reference source where I can go to read about whatever we have been discussing.

For instance, is there reference material (in addition to the Help text that Fernando kindly pointed out) to read about animateWithDuration and its parameters where we can go to discover more?


Fernando and Rajeejones - thank you both for your responses


Thank you, this was very useful.
I noticed in @Fernando 's reply that animateWithDuration is only available from iOS 8.0 and later. Does this mean that your code will have to check the iOS version to prevent a crash (and animate differently) when running on an earlier iOS version?


I don’t recommend supporting older versions of iOS. So yes, you will have to check to prevent crashes.

You can reduce your code complexity by avoiding backwards compatibility, especially if you’re just creating a prototype.

It gets more complex when you have to support legacy code bases, and you’ll have to write a lot of support code.


Yes, I plan on getting more links and resources to supplement the materials. I’ll make a note for my upcoming lessons.