Moving status bar in iOS 7

前端 未结 5 1249
悲哀的现实
悲哀的现实 2020-11-30 17:15

The problem I\'m facing is this:

I want to implement an iOS 7 app with nice design and left/right menu, which appears after the main view animate itself to the righ

5条回答
  •  广开言路
    2020-11-30 17:58

    I use this method to move statuebar with slider view,in a application there are two window,one normal window,other statuBarWindow,i get statuBarView which superView is statuBarWindows ,and move it with slider view.

    - (UIView *)statuBarView
    {
        NSString *key = [[NSString alloc] initWithData:[NSData dataWithBytes:(unsigned char []){0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x61, 0x72} length:9] encoding:NSASCIIStringEncoding];
        id object = [UIApplication sharedApplication];
        UIView *statusBar = nil;
        if ([object respondsToSelector:NSSelectorFromString(key)]) {
            statusBar = [object valueForKey:key];
        }
        return statusBar;
    }
    

提交回复
热议问题