Blog Archives

Optional parameters in methods in Objective C

Methods in Objective C are actually called messages but they’re often referred to as methods, a more commonly used terminology. Optional parameters are treated in an interesting way in Objective C. Basically there are no optional parameters! In fact the

Tagged with: ,
Posted in Objective C

Default String representation of an NSObject

In Actionscript, if you subclass Object, and you want a default string representation of your subclass, you just implement the method ‘toString’. For example the following: In Objective C, it’s very similar, however instead of ‘toString’ you use ‘description’.

Tagged with: ,
Posted in Objective C

Getters and Setters in Objective C

Doing a lot of Objective C lately, thought it worthwhile to write a few key differences with Actionscript. To begin with today – getters and setters! Properties in Objective C are automatically given setters and getters eg: is automatically given:

Tagged with:
Posted in Objective C