给View加自定义的网格线
应用介绍
该源码案例是一个给View加自定义的网格线,源码XIYGridBackgroundView,在view上绘制需要的线 XIYGridBackgroundView *view1 = [[XIYGridBackgroundView alloc] initWithFrame:CGRectMake(20, 40, self.view.frame.size.width-40, 200)]; view1.lineNumber = XIYLineNumberMake(4, 3); 4条水平线(不包含上下边),3条竖直线 view1.strokeColor = [UIColor lightGrayColor]; view1.lineInsets = UIEdgeInsetsMake(0, 0, 0, 0); view1.borderColor = [UIColor lightGrayColor]; view1.borders = UIRectEdgeTop|UIRectEdgeBottom; view1.autoresizingMask = UIViewAutoresizingFlexibleWidth; [self.view addSubview:view1];

©软件著作权归作者所有。本站所有内容均来源于网络,不得违法使用,仅供学习使用,请支持正版!
转载请注明出处: 662P » 给View加自定义的网格线
发表评论 取消回复