Fixed: default selection of a CPTabView

The selected tab item view is now loaded correctly after awakeFromCib, which wasn't the case before.
This commit is contained in:
Mathieu Monney
2015-10-27 08:09:17 +01:00
committed by Mathieu Monney
parent 526181a76b
commit ea95897bbd
+6
View File
@@ -789,7 +789,13 @@ var CPTabViewItemsKey = "CPTabViewItemsKey",
var idx = [self indexOfTabViewItem:_selectedTabViewItem];
if (idx !== CPNotFound)
{
// Temporarily set the selected item to not selected.
// It allows the initial selection to be made correctly.
_selectedTabViewItem = nil;
[self selectTabViewItemAtIndex:idx];
}
}
var type = _type;