执行代码时导航栏为黑色

时间:2015-03-02 10:43:55

标签: ios

我已经实现了代码,当我按下按钮UIView包含datepicker来自底部并显示

但它会使导航栏变黑 当我按下隐藏按钮时,它会使导航栏正常 导航栏只包含标题

在UIView包含日期选择器之前我有uiscroll视图

- (void)datePickerShow
{
    [UIView animateWithDuration:0.5 animations:^{
        CGRect location = [self.view1 frame];
        location.origin.y =[self.scrollViewProfile frame].size.height - location.size.height;
        NSLog(@"%f",location.origin.y);
        [self.view1 setFrame:location];
        //  [self.scrollViewProfile setContentOffset:(CGPointMake(0,location.size.height) ) animated:YES];
    } completion:^(BOOL finished) {

    }];
}

//-----------------------------------------------------------------------

- (void) datePickerHide
{
    [UIView animateWithDuration:0.5 animations:^{
        CGRect location = [self.view1 frame];
        location.origin.y =[self.scrollViewProfile frame].size.height +location.size.height;
        NSLog(@"%f",[self.scrollViewProfile frame].size.height);
        [self.view1 setFrame:location];
        [self.scrollViewProfile setContentOffset:(CGPointMake(0,0))animated:true];
    } completion:^(BOOL finished) {

    }];
}

1 个答案:

答案 0 :(得分:0)

尝试禁用基于View Controller的状态栏外观。请参阅:https://stackoverflow.com/a/18549998/3429577