I have UIprogressView inside a UIScrollView with two buttons as well.
I am setting the UIprogressView frame by code in ViewWillLayoutSubviews method:
newFrame.Width = MyScrollView.Frame.Width / 2; newFrame.Location = new CGPoint(0, NextButton.Frame.Y); MyProgressView.Frame = newFrame; MyProgressView.Transform = CGAffineTransform.MakeScale(1, 20f); MyProgressView.TrackTintColor = CustomColors.CustomColors.GetColor(CustomColors.CustomColors.ColorGray); MyProgressView.ProgressTintColor = CustomColors.CustomColors.GetColor(CustomColors.CustomColors.ColorBlue);`
The problem is when I rotate the device from portrait to landscape, only the progressview will disappear. Meanwhile the next button is there and both progress view and next button have same Y!.
If I stopped using MyProgressView.ProgressTintColor I can see the progress view after rotation but it is not scaled.
Any idea how to fix it?
This is the UIProgressView I am talking about: