1

how to set and get cashape layer title. i am doing below.

here is my code:

if(idx>1)
        {
            if (CGPathContainsPoint(path, &transform, point, 0)) {


                [shapelayer setLineWidth:self.lineWidth+5];
                [shapelayer setStrokeColor:self.pointSelectedCircleColor.CGColor];

               NSString* title =shapelayer.name;
              //  NSLog(@"%@",shapelayer.name);
            } else {
                [shapelayer setZPosition:0];
                [shapelayer setLineWidth:self.circleWidth];
                [shapelayer setStrokeColor:self.pointCircleColor.CGColor];
            }
        }
    }];



    return title;
Mayuri
  • 402
  • 6
  • 13
  • looks like this code runs inside block, see those answers: http://stackoverflow.com/q/20181708/1403732 http://stackoverflow.com/q/17642535/1403732 – sage444 Apr 21 '14 at 05:52

1 Answers1

0

Try this fahad

__block NSString *titleStr = @"";

that is because you can use your shape layer title get and set accordngly.

Umer Kiani
  • 3,783
  • 5
  • 36
  • 63