UIProgressView Direction?

Discussion in 'iOS Development' started by hitman2992, Jun 12, 2009.

  1. hitman2992

    hitman2992 New Member

    Joined:
    Dec 10, 2007
    Messages:
    123
    Likes Received:
    0
    Device:
    iPhone 3GS (Black)
    Is it possible to change the direction a progress view progresses? Right now it goes from left to right, I need it to go from right to left.

    I tried rotating it 180 degrees so it would get the effect I wanted but it made the progress view disappear.
  2. cocotutch

    cocotutch Community Development Team Staff Member

    Joined:
    Oct 6, 2008
    Messages:
    1,285
    Likes Received:
    117
    Device:
    5G iPod touch
    Maybe if you subclass it, I have never tried myself, but if the UIViewAnimation made it disappear, try a CA animation. If that doesn't work, then I think I can safely assume that you need to subclass it to get the effect you desire.

    EDIT: Maybe you could fill it from 1.0 to 0.0, the reverse effect? I know that wouldn't be exactly the same, but it would be a start

    Please Register or Log in to view images

  3. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    you could always create your own.
  4. hitman2992

    hitman2992 New Member

    Joined:
    Dec 10, 2007
    Messages:
    123
    Likes Received:
    0
    Device:
    iPhone 3GS (Black)
    that works
    never thought to do that

    Please Register or Log in to view images

  5. Pelaez-1

    Pelaez-1 New Member

    Joined:
    May 5, 2008
    Messages:
    822
    Likes Received:
    0
    Device:
    iPhone
    I have never tried this, but you could try making a reflection matrix and apply it to your view as a TransformMatrix.
  6. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    I sense a major HIG failure.

    Ask yourself, "is flying in the face if convention from the last umpteen years /really/ the *best* way to go about things?"
  7. Pelaez-1

    Pelaez-1 New Member

    Joined:
    May 5, 2008
    Messages:
    822
    Likes Received:
    0
    Device:
    iPhone
    Uh, BTW, here's how to reflect it on the Y axis:

    [yourView setTransform:CGAffineTransformMake(-1, 0, 0, 1, 0, 0)];

Share This Page