views:

47

answers:

1

If i implement my own version of awakeFromNib, should I call [super awakeFromNib] at the end of my method?

+3  A: 

The documentation covers that perfectly.

If you meant to ask about Cocoa Touch, you're not so lucky: The UIKit documentation doesn't answer the question definitively anywhere that I could find. Best I can suggest would be to follow the same rules as in Cocoa.

Peter Hosey
In this post, http://stackoverflow.com/questions/1588813/why-wont-my-awakefromnib-fire, the last answer does point to this information (section 4 of http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/LoadingResources/CocoaNibs/CocoaNibs.html)
KevinDTimm
KevinDTimm: I don't see anywhere on that documentation page that specifies whether one should send `[super awakeFromNib]`. Plenty of discussion of `awakeFromNib` for both Cocoa and Cocoa Touch, but none on that particular aspect.
Peter Hosey
I'm only commenting on the question about whether cocoa and cocoa touch respond to the same rules - it appears that they do not.
KevinDTimm
True, but the only difference I can see is that Cocoa Touch only sends `awakeFromNib` to objects that have just been unarchived, whereas Cocoa also sends it to the File's Owner.
Peter Hosey