i have one view with NStab, at tabindex0 i have some buttons here i am hiding my buttons开发者_如何学Go when i pressed on each one. at last button i am hiding that button and go to tabindex1. in tabindex1 i have a button called return.when i press that button i want to go my tabindex0 and display my buttons as it is.i.e i want to reinitialize my tabindex0.
There is no direct way to reinitialize a view, unless you are dealing with a case where you can remove it entirely and recreate it by reloading the nib file.
In this case, you just want to call setHidden:NO on all of the buttons. Something like:
for (NSView *subview in [[[myTabView tabViewItemAtIndex:0] view] subviews])
[subview setHidden:NO];
精彩评论