Reproducing Apple effects in the map app sliding the Status Bar

I am trying to replicate the effect in the Map app by which touching the map slides off and on again the top and bottom bars and the status bar along them even on iOS 7 and of course also on iOS 8 in my own app. Of course I have no problems in sliding my artifacts, but the status bar baffles me and I am not able to have it sliding on iOS 8 and much less on iOS 7. The best I may attain is to have it fading by overriding prefersStatusBarHidden; what does not of course go well with the general sliding movement.

How is it possible to do it instead?

Answers


You could do something like this:

   UIWindow *statusBarWindow = (UIWindow *)[[UIApplication sharedApplication] valueForKey:@"statusBarWindow"];
    if([statusBarWindow isKindOfClass:[UIWindow class]]){
        CGRect frame = statusBarWindow.frame;
        if(frame.origin.y < 0){
            frame.origin.y = 0;
        }
        else{
            frame.origin.y = -20;
        }

        [UIView animateWithDuration:0.15 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
            statusBarWindow.frame = frame;
        } completion:nil];
    }

Need Your Help

How to serialize (to comma separated list) SQL rows

sql sql-server

I currently have a view with columns along the lines of:

Open a jstree in a jquery dialog box

javascript jquery-plugins jquery-ui-dialog jstree

I've looked for every possible example, but couldn't find a complete one. I'm new to jQuery and javascript in general - I'm a backend developer. I'm trying to display the html results of an ajax call

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.