0

I am using YHAnimatedCircleView (http://yickhong-ios.blogspot.it/2012/04/animated-circle-on-mkmapview.html) to display an animated circle on a map. It works well with iOS6, while I am experiencing some problems with iOS7.

The circle appears after a long period on the map and it returns me the following error:

CoreAnimation: warning, deleted thread with uncommitted CATransaction;

0   QuartzCore                          0x00fcfa96 _ZN2CA11Transaction4pushEv + 374
1   QuartzCore                          0x00fcfe72 _ZN2CA11Transaction15ensure_implicitEv + 316
2   QuartzCore                          0x0106791b _ZN2CA5Layer12begin_changeEPNS_11TransactionEjRP11objc_object + 37
3   QuartzCore                          0x0106914e _ZN2CA5Layer12set_positionERKNS_4Vec2IdEEb + 290
4   QuartzCore                          0x010692a9 -[CALayer setPosition:] + 68
5   QuartzCore                          0x010699af -[CALayer setFrame:] + 799
6   UIKit                               0x0126329c -[UIView(Geometry) setFrame:] + 302
7   UIKit                               0x01361d50 -[UIImageView _setViewGeometry:forMetric:] + 210
8   UIKit                               0x01361fae -[UIImageView setFrame:] + 63
9   SampleApp                              0x0001d331 -[YHAnimatedCircleView drawMapRect:zoomScale:inContext:] + 1329
10  MapKit                              0x00c1b8ff __43-[MKOverlayView overlay:drawKey:inContext:]_block_invoke + 847
11  MapKit                              0x00c1b572 -[MKOverlayView overlay:drawKey:inContext:] + 268
12  VectorKit                           0x0bff941d -[VKRasterOverlay drawKey:inContext:] + 61
13  VectorKit                           0x0bff75e5 __40-[VKRasterOverlayTileSource _queueDraw:]_block_invoke + 485
14  libdispatch.dylib                   0x0647d818 _dispatch_call_block_and_release + 15
15  libdispatch.dylib                   0x064924b0 _dispatch_client_callout + 14
user2477825
  • 69
  • 1
  • 7

2 Answers2

0

I dont know exactly what your Framework is doing but the drawing of layers shouldn't be done in the main thread. So like in this thread discussed and solved, you should just use an async-dispatcher.

dispatch_async(dispatch_get_main_queue(), ^{
        [_mapView addOverlay:circle];
    });
Community
  • 1
  • 1
hasan
  • 553
  • 1
  • 5
  • 19
  • I've tried to adopt your solution but it doesn't change anything, I get the same error as above "CoreAnimation: warning, deleted thread with uncommitted CATransaction". – user2477825 Sep 28 '13 at 16:34
  • Ok. maybe you did not get all relevant parts of your code dispatched. See also [this thread](http://stackoverflow.com/questions/12507193/coreanimation-warning-deleted-thread-with-uncommitted-catransaction). – hasan Sep 28 '13 at 17:43
  • Thanks, no way. I've tried to dispatch all the overlay drawing on the main queue but I got no results. – user2477825 Oct 08 '13 at 16:40
0

Here is an example that updated the YickHong solution for iOS7.

https://github.com/jhurray/iOS7AnimatedMapOverlay

In iOS7, you can no longer add subviews to an MKOverlay. Check out the code here and ping me if you have any questions jeff@energ.io.

jhurray
  • 81
  • 4