我有代码在ios中绘制一个圆圈
int size = 60
int radius = size/2;
self.tapSelectionView = [[UIView alloc] initWithFrame:CGRectMake(longPressedPoint.x - radius, longPressedPoint.y - radius, size, size)];
self.tapSelectionView.layer.cornerRadius = radius;
self.tapSelectionView.layer.borderColor = [UIColor greenColor].CGColor;
self.tapSelectionView.backgroundColor = [UIColor clearColor];
self.tapSelectionView.layer.borderWidth = 2;
[self.view addSubview:self.tapSelectionView];
CGPoint centerOfOriginalFrame = CGPointMake(self.tapSelectionView.frame.origin.x + radius, self.tapSelectionView.frame.origin.y + radius);
centerOfDrawnCircle = centerOfOriginalFrame;
现在我想让这个圈子在ios上展开并压缩捏合手势。可以请任何人帮我解决这个问题,我是ios开发的新手。
答案 0 :(得分:0)
tapSelectionView
CGAfflineTransform
设置为tapSelectionView
,即变换比例以展开(缩小)和(放大)如果您需要示例代码,请务必看到此link