Rapidly switching between tabs causes view size to be wrong

Is there an option to force view size recalculation every time another tab is selected?
There is a $60.00 open bounty on this issue. Add more on Issuehunt.
- Checkout the Issuehunt explorer to discover more funded issues.
- Need some help from other developers? Add your repositories on Issuehunt to raise funds.
@SamusAranX Can you check with the current master?
I updated my project to the new API, but calling .show() on my PreferencesWindowController does absolutely nothing now. My app's open windows lose focus, but no preferences window is actually being opened.
Just tried calling .show() with an identifier, but that doesn't work either.
Though I've noticed that the window does get opened after all:
It's just that for some reason, it's invisible and doesn't participate in App Exposé.
I encountered this only my content views wouldn't have a proper intrinsicContentSize. Using AutoLayout probably is the easiest fix. How are you creating your content views, and can you set their size more rigidly somehow?
I already use Auto Layout. My views are loaded from XIBs and there's nothing special about them.

Since the labels are fully localized, I can't really make their size explicit.
@DivineDominion I can reproduce this by unchecking "Use Auto Layout" for the Advanced preference pane XIB. We need to be able to handle non-autolayout UI too, or if that's too difficult, at least throw an informative error.
The problem here is that https://github.com/sindresorhus/Preferences/blob/891d9df0ee36eb1e0d283051d0e17169371ed529/Sources/Preferences/PreferencesTabViewController.swift#L184 is .zero when Auto Layout is disabled on the view, so the window ends up being zero too. Maybe we could use viewController.view.bounds.size when viewController.view.fittingSize == .zero.
@issuehunt has funded $60.00 to this issue.
- Submit pull request via IssueHunt to receive this reward.
- Want to contribute? Chip in to this issue via IssueHunt.
- Checkout the IssueHunt Issue Explorer to see more funded issues.
- Need help from developers? Add your repository on IssueHunt to raise funds.
Just a heads up: Manually setting self.preferredContentSize in my views' various viewDidLoad() methods fixed the problem for me. It's not an optimal solution, but I couldn't find a better way to do it at the moment.
If anyone wants to work on this, make sure to see the previous attempt and feedback: https://github.com/sindresorhus/Preferences/pull/28
We should also check whether the situation improved in macOS 11.