Monthly Archives: February 2014

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: [sourcecode language=”actionscript3″] package { public class Thing { public var name:String; public function toString()

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: [sourcecode language=”objc”]@property (strong,nonatomic)

Tagged with:
Posted in Objective C