九宫格的创建
2017-05-15 本文已影响10人
蜗牛锅
创建九宫格代码
// 九宫格
#define RECTJGG(width,height,dx,dy,col_num,lin_num,i) CGRectMake( ((width)-2*(dx))/(col_num) * ((i)%(col_num)) + (dx),\
((height)-2*(dy))/(lin_num) * ((i)/(col_num)) + (dy),\
((width)-2*(dx))/(col_num),\
((height)-2*(dy))/(lin_num))