思路一:利用Masonry约束x、y坐标的起始位置,在动画时间内改变x坐标轴的宽度和y坐标轴的高度。结果:坐标轴从屏幕左上角开始绘制,不是理想中的效果。代码如下:
//绘制坐标轴
- (void)drawCoordSystem{
UIView *xCoord = [selfgetLine];
UIView *yCoord = [selfgetLine];
[xCoord mas_updateConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(@(self.view.bounds.size.width - 20.0));
}];
[yCoord mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(@(self.view.bounds.size.height - 60));
}];