iOS 7 UIToolBar Overriding With Status Bar

前端 未结 6 1459
你的背包
你的背包 2020-12-06 07:20

I have upgraded my project from iOS 6 to iOS 7 but there seems a little problem. The status bar and a tool bar is overriding and very close to each other. The tool bar was e

6条回答
  •  醉话见心
    2020-12-06 07:55

    _toolBar.delegate = self;
    
    - (UIBarPosition)positionForBar:(id )bar {
        CGRect frame = _toolBar.frame;
        frame.origin = CGPointMake(0, [UIApplication sharedApplication].statusBarFrame.size.height);
        _toolBar.frame = frame;
    
        return UIBarPositionTopAttached;
    }
    

    portrait bar

    landscape bar

提交回复
热议问题