0

i have implemented code in which when i press button UIView Contains datepicker come from bottom and displayed

but it make navigation bar black and when i press on hide button it make navigation bar normal navigation bar contains just title

i have uiscroll view before UIView contains date picker

- (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) {

    }];
}
Prashant Tukadiya
  • 15,838
  • 4
  • 62
  • 98

1 Answers1

0

Try to disable View Controller-based status bar appearance. See this: https://stackoverflow.com/a/18549998/3429577

Community
  • 1
  • 1
kelin
  • 11,323
  • 6
  • 67
  • 104