0

I want to add a unknown count of Custom Views to a NSScrollView within a Xamarin Mac application, but I cannot find a way to do this. On iOS I would create a UIScrollView containing a UIView containing a UIStackView which will automatically layout the controls.

I tried it like this:

var controller = (AudioViewController)Storyboard.InstantiateControllerWithIdentifier("AudioView");
var subview = controller.View;
stvFiles.AddArrangedSubview(subview);

the first view will be displayed, but needs the whole space, and the second view will not be visible.

How would one do it adding dynamically views to a NSScrollView?

Thanks in advance for your help!

DirtyNative
  • 2,553
  • 2
  • 33
  • 58

1 Answers1

0

Solution

For everyone having the same problem, here is a solution i found. It was coded with Swift, but implementing it in C# is easy.

DirtyNative
  • 2,553
  • 2
  • 33
  • 58