I have a visibility panel containing an NSSearchField. The panel can be displayed and hidden using the menu item. I create this bar by creating a new NSViewController (and loading a new view from XIB). When the line is displayed, I do addSubview: in the contentView window; when the panel is hidden, I delete FromSuperview into the view in the view controller.
If the application and the panel are already open at startup, clicking the tab switches between the main view in the window (table view) and the search field in the visibility area. If I run the application and the panel has not yet been shown, as soon as I show the panel, I can insert a tab from the table view into the search field, but not the other way.
As soon as I remove the visibility panel for the first time, then show it again, I can no longer go between the search field and the table view, regardless of which view is currently selected.
Is there anything I need to do besides addSubview: and removeFromSuperview? I canβt wrap my head around why this will not work, and especially why I get different types of behavior if the panel is displayed at startup or not.
source
share