On viewwillAppear I am changing the navigationbar background color. I am trying to set a view with frame (0,53,width,height). On the first go it is showing proper and it's taking 53 after navigationbar's height but when I change the theme and come to that controller it's taking 53 from 0. So it's hiding behind the navigation bar.
I am writing following code in viewwillappear.
if(oldTheme)
{
self.navigationController?.navigationBar.setBackgroundImage(UIImage(named:"bar.png"), for: .default)
}
else {
self.navigationController?.navigationBar.setBackgroundImage(UIImage(named:"bar2.png"), for: .default)
}
Please advice.
THanks in Advance.