如果每行显示4个按钮
count是数据总数
行数计算为:btnRowCount = (count - 1) / 4 + 1;
行间隔数:btnRowCount - 1
子视图frame计算时
x : (i % 4) * (子视图宽度 + 列间隔)
y :(i / 4) * (子视图高度+ 行间隔)
如果每行显示4个按钮
count是数据总数
行数计算为:btnRowCount = (count - 1) / 4 + 1;
行间隔数:btnRowCount - 1
子视图frame计算时
x : (i % 4) * (子视图宽度 + 列间隔)
y :(i / 4) * (子视图高度+ 行间隔)