2

I have an application with a tab view with multiple tab view items.

Whenever I run my application, it opens with the tab view item that was last selected when the application was previously run.

I always want the first item to open.

I've tried setting the "Initial Tab" setting in the Tab View Attributes inspector, but that has no effect. I've also tried selectTabViewItem: at the end of windowDidLoad: in the window controller, but that also didn't work.

Any idea?

TIA

Problem solved:

After a bit more digging, I found that, by default, "Restorable" was set in the parent Window's Attributes inspector. This caused the last selected tab view item to be restored when the application was re-run.

  • Please post your answer separately from your question. You can then mark it as solved by ticking the checkbox to the left of your answer. This way the community knows the question is solved people interested in your question can easily find the answer. – Sicco Aug 19 '12 at 17:44

1 Answers1

0

You could also implement

- (void) viewWillAppear: (BOOL) animated

and set whatever tab you want there.

Kent
  • 1,691
  • 4
  • 19
  • 27