It seems every NSNotification has a method named "object" returns the real UI element fires this notification.
For example, in table view, when user click one item in the table view, a "NSTableViewSelectionDidChangeNotification" is fired, and the delegate will receive it. Then the delegate can use [aNotification object] to get the real table view. So it won't need to save a outlet of the table view.
No comments:
Post a Comment