Rotating an AGSTextSymbol in XCode 6

10-07-2014 08:45 AM
New Contributor


since I have updated my XCode-App to version 6 I'm experiencing strange behaviors of AGSTextSymbols when it comes to rotating them. I've updated to SDK version 10.2.4 but that didn't change anything.

As you can see in the screenshot I have created a red polyline with text objects attached to the line segments. The black line under each text is the "underline" that comes from the text object - it is correctly rotated. But the text itself rotates in a strange manner.


Here's the simple code snippet for my text objects:

   AGSTextSymbol *textSym = [[AGSTextSymbol alloc] initWithText:[[NSString stringWithFormat:@"%1.2fm", length]stringByReplacingOccurrencesOfString:@"." withString:@","] color:[UIColor blackColor]];
   textSym.angle =  -degree_angle;
   textSym.fontSize = 20;
   textSym.italic = YES;
   textSym.underline =YES;

All I can say: It worked in XCode 5. Now it doesn't. Do you have any idea?

Tags (1)
0 Kudos
2 Replies
Esri Regular Contributor

Unfortunately you have run into a bug. Text symbol rotation on iOS 8 seems to rotate individual text characters instead of the whole text. We are investigating, but probably won't be able to fix till our next release.

0 Kudos
Esri Regular Contributor

As a workaround, if you only have a small number of graphics, you can try displaying the text symbols in a separate graphics layer that uses dynamic rendering mode. This mode was introduced at version 10.2, and seems to work fine with iOS 8 even with rotation. More information about the static v/s dynamic mode of graphics layer is available here : Release notes for 10.2—ArcGIS Runtime SDK for iOS | ArcGIS for Developers

0 Kudos