Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is my NSTableView in NSScrollView?

Why in Xcode 4 (i don't kwow in 3.2) when i drag and drop a table from interface builder it became NSScrollView? Where is NSTableView??? (NSTableView in NSScrollView)

How can i access NSTableView from NSScrollView?

How can i add a row, delete, customize and RELOAD DATA?


Why if i do

for (id obj in scrollView.subviews)
  NSLog(@"obj: %@", obj);

i don't able to get NSTableView description?

thanks.

like image 467
elp Avatar asked Oct 24 '11 20:10

elp


1 Answers

XCode automatically embeds the table in a scroll view for you. To select your Table View you can either slowly double click on the Scroll View, press control+shift and click on the Scroll View, or click the right-facing triangle under the vertical objects in the XIB to reveal every object in the XIB.

You can access it programatically by calling [scrollView documentView], because it is technically a subview of the ScrollView's Content View (an instance of NSClipView)

To populate your table view you can provide content by hooking up a data source, or by binding its table columns to an array controller.

It's kind of complicated, you should probably take a look at the Documentation

like image 181
Francis McGrew Avatar answered Sep 19 '22 16:09

Francis McGrew