Search code examples
iosobjective-carcgis

ArcGIS for iOS callout custom view frame not setting properly


I am attempting to set a custom view for callouts on my map, but I can't seem to get the positioning right. The view is just a series of labels and after setting their text properties, I calculate the dimensions of the custom view and set its frame to be at (0, 0, calculatedWidth, calculatedHeight). It is then set as the callout's customView.

On the first tap on a graphic, it works fine, although there is a slightly visible outline from the callout that isn't too much of an issue since I've made the colors match. However, on all subsequent taps on any graphic, the callout bubble that ArcGIS generates does not have my view centered in it anymore. It is quite noticeably positioned up and to the left. The frame of the customView does not at any point set its origin to anything but (0,0) in my code.

Does anyone know why that might be happening?


Solution

  • Not really sure what caused this issue, but I managed to fix it by making some global properties local (I can't even remember why they weren't in the first place) and the view doesn't get misplaced anymore.