remove 'drunk' code and simply use resizing masks

This commit is contained in:
Antoine Mercadal committed 2010-10-19 22:53:52 +02:00
1 parent 560c971aeb
commit 3d82203893
1 file changed
+3 -40
+3 -40
View File
@@ -73,50 +73,13 @@ var HEIGHT_OF_SEGMENTED_CONTROL = 24;
[self addSubview:box];
[self addSubview:tabs];
[box setAutoresizingMask:CPViewWidthSizable];
[tabs setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin];
}
return self;
}
/*!
Override CPView message to allow to set the autoresizing mask
of the tabview and it's subview
@param unsigned aMask the autoresizing mask
*/
- (void)setAutoresizingMask:(unsigned)aMask
{
[box setAutoresizingMask:aMask];
[super setAutoresizingMask:aMask];
}
/*!
Override the CPView method in order
to allow to reposition the segmented control
@param aFrame the new frame
*/
- (void)setFrame:(CGRect)aFrame
{
[super setFrame:aFrame];
[self _repositionTabs];
}
/*!
Override the CPView method in order
to allow to reposition the segmented control
@param someBounds the new bounds
*/
- (void)setBounds:(CGRect)someBounds
{
[super setBounds:someBounds];
[self _repositionTabs];
}
// Adding and Removing Tabs
/*!
Adds a CPTabViewItem to the tab view.