Post

Replies

Boosts

Views

Activity

Reply to Correct way of inserting Audio Unit views into Auto Layout
@QuinceyMorris I first add the Audio Unit view to the container view and then fix the size of the latter so that it matches the Audio Unit. This gets updated in viewWillLayout which, at least in the case of AUv2 Audio Units, gets called when the user changes the intrinsic size of the view (for example by toggling "Details" in the case of AUMultibandCompressor). Note that the root view of MyViewController is set to an NSView in MainMenu.xib, so changing the size of its view does have the effect of changing the size of the main window (again, see the AUMultibandCompressor example). If I don't add the width and height constraints then the window does not adjust its height when the user toggles "Details" in AUMultibandCompressor (and it doesn't work any better for Apple's AUv3 sample).
Jun ’20