Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jox0

macrumors newbie
Original poster
Jan 10, 2014
5
0
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.

2m2e32o.png


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.

1zl8014.png


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.
 

dominsbeard

macrumors newbie
Oct 8, 2013
19
0
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.
 

MacMan988

macrumors 6502a
Jul 7, 2012
833
116
Status bar is transparent right? shouldn't it be showing the color of the view behind it already?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.