Animating UITextField's and UIImageView's... -.-

Discussion in 'iOS Development' started by lolwut?, Apr 9, 2009.

  1. lolwut?

    lolwut? Banned

    Joined:
    Apr 5, 2009
    Messages:
    73
    Likes Received:
    0
    Device:
    iPod touch
    Ok, I'm making something in SDK, and it involves the animations of the URL bar in Safari (go into safari and tap the URL bar or Search bar and you'll see what I mean).
    But, I'm having a few problems.
    I'm using 1 UITextField and 1 UIImageView for each bar.
    The UIImageView's are set using stretchableImage so that I can stretch them without it going... stretched.
    The animations work fine except for two problems.
    I'm using UIView animations ([UIView beginAnimations], etc), but when the textfield is being stretched to a wider size, all of a sudden the text becomes really compressed (the letters thinner and closed together) and as the UITextField gets bigger to the set frame, the text gets wider until it looks better. It's very noticeable and looks terrible.
    Second problem. When the ImageView's stretch in and out, at the very start of the animation, the image becomes stretched and once again, as the animation goes through it goes back to normal.
    Any help?
    Sorry I've been asking a ton of questions lately >.>
  2. jlgm25

    jlgm25 Well-Known Member

    Joined:
    Nov 1, 2008
    Messages:
    3,302
    Likes Received:
    28
    Device:
    4G iPod touch
    can you give a screenshot?
  3. lolwut?

    lolwut? Banned

    Joined:
    Apr 5, 2009
    Messages:
    73
    Likes Received:
    0
    Device:
    iPod touch
    Sure, I'll just slow down the animation so I have more time.

    Condensed text:
    Before:

    Please Register or Log in to view images


    After:

    Please Register or Log in to view images


    Start of the very first time you click the bar:

    Please Register or Log in to view images


    Start of each animation after that:

    Please Register or Log in to view images



    Stretched image (Search bar - the most noticeable):
    Before:

    Please Register or Log in to view images


    After:

    Please Register or Log in to view images


    Start of Animation:

    Please Register or Log in to view images


    Start of Reverse Animation:

    Please Register or Log in to view images

Share This Page