CALayer re-positioning causes extreme glitching

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

  1. Cbswe macrumors member

    Joined:
    Jan 11, 2010
    #1
    Hi!

    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

    (marc)

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

Share This Page