How is youtube app's status bar animation implemented?

Discussion in 'iOS Programming' started by jox0, Jan 13, 2014.

  1. jox0 macrumors newbie

    Joined:
    Jan 10, 2014
    #1
    Youtube iOS app's status bar has a animation when user drags main view to the right to reveal the menu view. I've googled for a while but still do not know how to implement this animation. I'm writing a forum client (deploy target is iOS7) which has a side menu. The problem is the background color of menu is different from the color of front page's nav bar. See picture below.

    [​IMG]

    It looks really bad when dragging the main view. The walk around I've done by now is to shrink the main view using CGAffineTransform gradually to let the whole status bar in menu view. See picture below.

    [​IMG]

    I personally like youtube app way better. I've googled stuff like "how to change background color of status bar in iOS7". But all I got so far is that I can only use black and white color. Does anyone know how to implement it? Some hint or names of iOS technique used in Youtube is good enough. Thank you.
     
  2. dominsbeard macrumors newbie

    Joined:
    Oct 8, 2013
    #2
    place a UIView behind the status bar on your main view. Make it the same color as your menu background and set it's alpha to 0. When the menu slides out change the alpha on that UIView to 1.
     
  3. MacMan988 macrumors 6502a

    Joined:
    Jul 7, 2012
    #3
    Status bar is transparent right? shouldn't it be showing the color of the view behind it already?
     

Share This Page