Reputation: 1040
I have never used NSScrollView, but looking at the tutorials, I thought It should be easy to figure out.
However, It turns out to be not intuitive at all. I pulled a ScrollView. It did not have any scrollers, though I have then enabled. No place to set ContentArea or of some sort. And. it has a clipview inside it and that clip view has another view inside. You can only add a view inside that third View.
So I thought of adding an Image view inside and it doesn't work at all. When I run, it doesn't show up. Nothing.
What am I doing wrong?
Here is the DropBox Link to project
Upvotes: 1
Views: 830
Reputation: 1180
You need 2 steps.
Fist you should position you view towards left top corner of clip view. Add 2 constraints as shown on the picture:
Then make sure you picture expands to parent view but set priority to 750 so it would not expand entire window:
Then it will look correct:
Here is your fixed project:
https://github.com/emankovski/NSScrollViewExperiment
PS: You also forgot to drag your picture to the assets catalog. I did that in the fixed project.
Upvotes: 5