title: How to draw an open ended triangle with a specific angle in an UIView?
body: <p>I'm stumped here and need some assistance with this. For testing purposes I have a UIView that I draw into via drawRect (code below). I'm able to draw a circle with an specific angle and such but it's filled and closed. I need it to be open and stroked. I'm currently using UIBezierPath to do this but is there better way to do this? I can draw the open ended triangle like I want in UIBezierPath but I can't specify the angle that I need it to be (code below also). Any assistance with this would be much appreciated. Thanks.</p>
  
  <p>The picture below is how I would like it to look when I draw it with a specific angle.</p>
  
  <p><img src="https://i.stack.imgur.com/Ue3JO.jpg" alt="enter image description here"></p>
  
  <pre><code>#import "AngleView.h"
  #define   DEGREES_TO_RADIANS(degrees)  ((M_PI * degrees)/ 180)
  @implementation AngleView
  
  -(void)drawRect:(CGRect)rect {
  
  UIBezierPath *aPath = [UIBezierPath bezierPathWithArcCenter:CGPointZero
                                                       radius:50
                                                   startAngle:0
                                                     endAngle:DEGREES_TO_RADIANS(45)
                                                    clockwise:NO];
  
  [aPath fill];
  }
  
  @end
  </code></pre>
  
  <p>and here is how I can draw it without a specific angle.</p>
  
  <pre><code>UIBezierPath* bezierPath = [UIBezierPath bezierPath];
  [bezierPath moveToPoint: CGPointMake(86.5, 33.5)];
  [bezierPath addLineToPoint: CGPointMake(60.5, 62.5)];
  [bezierPath addLineToPoint: CGPointMake(87.5, 62.5)];
  [[UIColor blackColor] setStroke];
  bezierPath.lineWidth = 1;
  [bezierPath stroke];
  </code></pre>