Fixed: button are always removed from the superview in layoutSubviews

Previously, the button of a CPButtonBar were always removed and readded in the method layoutSubviews.
Now we only remove the hidden button.
This commit is contained in:
Alexandre Wilhelm
2014-12-08 15:29:28 -08:00
parent b2557c38dd
commit cb5fe06e58
+3 -2
View File
@@ -234,10 +234,11 @@
{
var button = buttonsNotHidden[count];
[button removeFromSuperview];
if ([button isHidden])
{
[button removeFromSuperview];
[buttonsNotHidden removeObject:button];
}
}
var currentButtonOffset = _resizeControlIsLeftAligned ? CGRectGetMaxX([self bounds]) + 1 : -1,