创建九宫格代码
// 九宫格
#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))
创建九宫格代码
// 九宫格
#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))
本文标题:九宫格的创建
本文链接:https://www.haomeiwen.com/subject/nzqkxxtx.html
网友评论