findBarContainer
Specifies the find bar container.
Declaration
@IBOutlet unowned(unsafe) var findBarContainer: (any NSTextFinderBarContainer)? { get set }Discussion
This property must be set to support the find bar.
When an instance of NSTextFinder receives a request to display the find bar, it creates a view for the find bar and assigns it to the findBarView property of its findBarContainer. This container owns that view, and it’s responsible for making the view visible when the container’s isFindBarVisible property is true. Implement the container’s findBarViewDidChangeHeight() method to reposition the find bar when its height changes, which typically occurs in response to a user interaction.
The NSScrollView class implements NSTextFinderBarContainer protocol and is the correct place to display the find bar in most circumstances. The container may freely modify the find bar view’s width and origin, but not its height.
If this property is not set, then the find bar cannot be shown.