To Make an item wiggle and delete

Discussion in 'iOS Programming' started by gbf.sara, Jun 6, 2010.

  1. gbf.sara macrumors newbie

    May 30, 2010
    I need to delete/remove an item in my Iphone application. For that i should make tat item wiggle(shake) when i give long press. And then it should ask for an alert to delete or not???

    Can anyone guide me plz??? It ll be more helpful if u help me with a source code

    Tanx in advance
  2. robbieduncan Moderator emeritus


    Jul 24, 2002
    It would be more helpful to us if you spelt correctly and not like 12 year old texting.

    There is no single-function to do this. You will need to use core animation to rotate the view containing the item you want to delete. When that animation completes rotate back. To give the impression of wiggling also animate the position a little bit and randomise the amounts of all movements.

    And before you ask again, I don't give source code. I expect people to be able to read the documentation and work things out. Copy-and-paste is not programming and you learn nothing from it.
  3. gbf.sara thread starter macrumors newbie

    May 30, 2010
    Tanx a lot brother
  4. PatrickCocoa macrumors 6502a

    Dec 2, 2008
    Are there random elements in the wiggle-to-delete that Apple does (when you press and hold an app icon)? I've never tried to do this in an app view, it's an interesting question. It looks like each icon rotates about its center about 10 degrees, then reverses course. However each icon does not appear in phase with its neighbors - possibly there's a random delay in starting the back-and-forth rotation.

Share This Page