CALayer re-positioning causes extreme glitching

Discussion in 'iOS Programming' started by Cbswe, Sep 18, 2010.

  1. Cbswe macrumors member

    Jan 11, 2010

    I'm developing a part of an application that displays a map.
    You can move it around and zoom it by draging and pinching.
    The app has worked very good in the simulator, but just recently I finally have had a chance to test it on an actual device and to my horror I find that it glitches like crazy.

    In touches began I store two float values, one for X and one for Y.

    In touches moved I calculate the difference between the old X and Y values and the new one and I set the layer-position to the layer-positions old position + the difference I just calculated.

    Now this invokes several position-changes for each gesture. But it worked OK in the simulator.

    Does anyone have an idea of what is wrong?

    Any help is much appreciated!
  2. (marc) macrumors 6502a


    Sep 15, 2010
    the woods
    This won't solve your problem, but is there any reason you don't use a MKMapView?

Share This Page