九宫格的创建

创建九宫格代码

// 九宫格
#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))

你可能感兴趣的:(九宫格的创建)