Wednesday, 17 August 2011

initWithCoder

I was always under the understanding that initWithCoder was to be used purely for archiving. However after doing a bit of digging have found that if there is no archive it loads the default class. for example in the case of a UIView it will call the drawRect function which facilitates any custom drawing that you want to do on the view.

(Little things like this can save a lot of time and effort)

No comments:

Post a Comment