私は次のポップアップを持っており、エッジをカーブにしたいと思っています。 iPhoneで矢印を使ってポップアップスタイルのビューを作成するobjective-c
このコードを使用する。
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetStrokeColorWithColor(context, [[UIColor greenColor] CGColor]);
CGFloat baseWidth = 15.0;
CGFloat height = 10.0;
CGContextMoveToPoint(context, self.bounds.size.width/2.0 - baseWidth/2.0, height);
CGContextAddLineToPoint(context, self.bounds.size.width/2.0, 0);
CGContextAddLineToPoint(context, self.bounds.size.width/2.0 + baseWidth/2.0, height);
CGContextAddLineToPoint(context, self.bounds.size.width, height);
CGContextAddLineToPoint(context, self.bounds.size.width, self.bounds.size.height);
CGContextAddLineToPoint(context, 0, self.bounds.size.height);
CGContextAddLineToPoint(context, 0, height);
CGContextClosePath(context);
CGContextStrokePath(context);
どのようにエッジをカーブすることができますか?
'CGContextAddArcToPoint'または' CGContextAddCurveToPoint'を。 – rmaddy