Currently, I'm binding the NSArray to NSArrayController and then to a NSTableView, so the data and selection is working correctly, b开发者_如何学运维ut seems I can't tell table view to scroll to selection from NSArrayController. Do I have to add an NSTableView outlet?
I certainly can do that, but I'd try to see if there's a better way to avoid introducing UI controls to Controller side.
The job of the Controller is to sit between the Model and View and talk to both of them as needed. This means that, yes, you will have to make the Controller know of the View; this is both necessary and appropriate.
精彩评论