FIXED: buttons in CPButtonBar were never removed from the CPButtonBar

Previsouly, layoutSubview was layouting the visible buttons, but it was not removing them from
the buttonbar
This commit is contained in:
Antoine Mercadal
2014-08-28 17:26:22 -07:00
parent 3cf013b25b
commit f1cfa14750
+8 -2
View File
@@ -218,8 +218,14 @@
count = [buttonsNotHidden count];
while (count--)
if ([buttonsNotHidden[count] isHidden])
[buttonsNotHidden removeObject:buttonsNotHidden[count]];
{
var button = buttonsNotHidden[count];
[button removeFromSuperview];
if ([button isHidden])
[buttonsNotHidden removeObject:button];
}
var currentButtonOffset = _resizeControlIsLeftAligned ? CGRectGetMaxX([self bounds]) + 1 : -1,
bounds = [self bounds],