15

I am new to Mac OSX Programming. I have created on iOS apps in which I can set The content size of UISCrollView by using contentSize property. But there is no such property I found for Mac Apps. How it can be done and how can I enable the scrolling in Mac App. I looked on to the other questions on Stackoverflow but I didn't find anything relevant. Thanks-

Developer
  • 6,375
  • 12
  • 58
  • 92

1 Answers1

31

NSScrollView has documentView attached to it. You can change the content size by updating the frame of documentView.

[scrollView.documentView setFrame: NSMakeRect(0,0,new_width, new_height) ];

Greg
  • 33,450
  • 15
  • 93
  • 100
Sohaib
  • 10,941
  • 9
  • 32
  • 34