You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for(UIView *v in self.subviews)
{
//start a new row if needed. If the first item is too wide, present it regardless.
if(itemsInRow>0 && curX+v.width > self.width)
{
rowY = maxHeight + padding;
//maxHeight = 0.0;
curX = padding;
itemsInRow = 0;
}
//Orders in rows. Could be improved to save initial widths for items that are too wide to fit a row.
(void)layoutSubviews
{
double rowY = padding;
double maxHeight = 0.0;
double curX = padding;
int itemsInRow = 0;
for(UIView *v in self.subviews)
{
//start a new row if needed. If the first item is too wide, present it regardless.
if(itemsInRow>0 && curX+v.width > self.width)
{
rowY = maxHeight + padding;
//maxHeight = 0.0;
curX = padding;
itemsInRow = 0;
}
}
self.height = rowY + maxHeight + padding;
}
The text was updated successfully, but these errors were encountered: