I have a NSTabView with 3 tabs. I want to prevent the subviews of those tab from drawing until it is selected. How would I go about doing this? I have set up a delegate for the NSTabView but am having trouble figuring out which tab is selected.
Asked
Active
Viewed 63 times
1 Answers
0
I had similar problem(i had two views, view1 above view2 and view2's subviews were drawed while a i was dragging view1)
The way out was to make a tmpView,that contained all subviews and make
[tmpView setHidden:YES];
if it wasn't an active view, and switch on visibility when view2 became active.

Sangram Shivankar
- 3,535
- 3
- 26
- 38

alex
- 2,121
- 1
- 18
- 24
-
that answers part of it, but how do I detect which tab is detected to determine which view to set hidden/unhidden? – stormbard Jan 10 '13 at 21:26
-
tabState property of NSTabViewItem can be NSSelectedTab, NSBackgroundTab, or NSPressedTab. – alex Jan 10 '13 at 21:33
-
that got it, is there a way to prevent drawing until that after the application has finished launching? or how do I pass the ManagedObjectModel and ManagedObjectContext to the tab view? – stormbard Jan 10 '13 at 22:04