Create Line with arrow in iOS Objective C
Solution: In iOS you can create a Line using CGContextref.The below code is used for draw a line in a view in x1,y1, is 0,0 and x2,y2 is 20,20. Also add the cap in the end of the line to show the line as arrow CGContextRef ctx = UIGraphicsGetCurrentContext (); CGRect rect = CGRectMake ( 0 , 0,20,20 ) CGContextClearRect (ctx, rect); CGContextSetStrokeColorWithColor(ctx, color.CGColor); CGContextSetLineCap(ctx, kCGLineCapRound); CGContextSetLineWidth(ctx, 10); CGContextSetAlpha(ctx, 1); CGContextMoveToPoint(ctx, 0, 0); //add the cap CGPoint fPoint=CGPointMake(0,0); CGPoint ePoint=CGPointMake(20,20); CGFloat capHeight = 1 * 4.0f; CGFloat angle = [self angleWithF...