私はUIImageViewの中にいくつかの円を特定の画像で描画しようとしています。これは私がやろうとしたものである。UIImageViewでシェイプを描くIOS
UIGraphicsBeginImageContext(self.view.bounds.size);
CGContextRef contextRef = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(contextRef, 2.0);
CGContextSetStrokeColorWithColor(contextRef, [color CGColor]);
CGRect circlePoint = (CGRectMake(coordsFinal.x, coordsFinal.y, 50.0, 50.0));
CGContextStrokeEllipseInRect(contextRef, circlePoint);
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[photoView addSubview:image];
円が細かい描かれているが、私はそれにマスクとして機能するようにてPhotoViewをしたいと思います。たとえば、UIImageViewをアニメーションを使用してUIViewから移動する場合、その円も一緒に移動したいと思います。重要なことは、座標がスクリーン全体に関連しているということです。
カスタムUIView、または派生したカスタムUIImageViewのようなサウンドです。 – trumpetlicks