title: iPhone CorePlot pie chart get slices coordinates
body: <p>I'm using CorePlot to draw PieChart. I would like to display labels for slices on slices themselves. Is there a way to get coordinates of each slice and then setting the frame of CPTLayer that holds the text label to adjust to coordinates of the slice?</p>
  
  <p>What I am doing so far:</p>
  
  <pre><code>-(CPRLayer*) datLabelForPlot(CPTPlot*)plot recordIndex:(NSUInteger)index {
    static CPTMutableTextStyle *textStyle = nil;
    NSString *string = @"Test";
  
      if ( !textStyle) {
          textStyle= [[CPTMutableTextStyle alloc] init];
          textStyle.color = [CPTColor whiteColor];
      }
      CPTLayer *layer = [[[CPTLayer alloc] initWithFrame:CGRectMake(50,50, 100, 20)]autorelease];
      CPTTextLayer *newLayer = nil;
      newLayer = [[[CPTTextLayer alloc] initWithText:string style:textStyle] autorelease];
      [layer addSublayer:newLayer];
      return layer;
  }
  </code></pre>
  
  <p>but regardless of the layer frame, label is always displayed at the same position (outside the chart). How to set the appropriate layer frame to display the text on the slice itself?</p>
  
  <p>Here is the image of the points I would like to know:
  <img src="https://i.stack.imgur.com/jyQaY.png" alt="piechart"></p>