From within the delegate method, if you ask for an IB view (makeviewWithIdentifier:owner:), the view is now automatically reusable.

Before that, IB views were reusable only if the delegate method was not implemented.
If you create a view in code, you still need to make it reusable by calling -setIdentifier:

Woow ... now viewBasedCib loads the views x3 times faster.
This commit is contained in:
cacaodev committed 2012-07-23 19:55:06 +02:00
1 parent 4c4a707624
commit 0faf38a1e1
2 files changed
+6 -2

No files matched your search

+3
View File
@@ -3651,7 +3651,10 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
{
var o = objects[count];
if ([o isKindOfClass:[CPView class]])
{
[o setIdentifier:anIdentifier];
return o;
}
}
return nil;
@@ -83,7 +83,7 @@
<string key="NSFrameSize">{755, 371}</string>
<reference key="NSSuperview" ref="899639644"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1070384134"/>
<reference key="NSNextKeyView" ref="168286789"/>
<string key="NSReuseIdentifierKey">_NS:13</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTableHeaderView" key="NSHeaderView" id="179744187">
@@ -282,6 +282,7 @@
<string key="NSFrame">{{1, 373}, {755, 15}}</string>
<reference key="NSSuperview" ref="62651824"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:60</string>
<int key="NSsFlags">1</int>
<reference key="NSTarget" ref="62651824"/>
@@ -309,7 +310,7 @@
<string key="NSFrame">{{0, -1}, {757, 389}}</string>
<reference key="NSSuperview" ref="439893737"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="899639644"/>
<reference key="NSNextKeyView" ref="1070384134"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<int key="NSsFlags">133682</int>
<reference key="NSVScroller" ref="123481257"/>