Merge branch 'refs/heads/slevenbits-tabview-cib-fix'

This commit is contained in:
Alexander Ljungberg committed 2013-02-22 19:10:28 +00:00
commit 9be703e271
1 file changed
+11
+11
View File
@@ -520,6 +520,17 @@ var CPTabViewItemsKey = "CPTabViewItemsKey",
return self;
}
- (void)awakeFromCib
{
// This is a quick and dirty fix of the tab view item we decode and install in _box
// having a different _superview decoded later in the decoding process - e.g. the
// CPTabView itself as is the case when we're coming from an xib. This solution could
// probably be improved by fixing this in nib2cib instead, but the _box doesn't yet
// exist then so it's not totally clear what to change the superview to at that stage.
if ([_box contentView])
_box._contentView._superview = _box;
}
- (void)encodeWithCoder:(CPCoder)aCoder
{
[super encodeWithCoder:aCoder];