Hello,
I just updated to Xamarin.iOS 7.2.1.42 today and ran into a major problem.
I have a custom UIView that looks something like this:
public class CustomView : UIView
{
public override void Draw(RectangleF rect)
{
using (var context = UIGraphics.GetCurrentContext())
{
using (var cgColor = this.BackgroundColor.CGColor)
{
context.SetFillColor(cgColor);
context.FillRect(this.Bounds);
}
// ...
}
}
}
Somewhere else in my code, I instantiate the view, set it's background color, and add it to a parent view:
var view = new CustomView(frame);
view.BackgroundColor = UIColor.Black;
this.Add(view);
The problem is my app occasionally crashes in CustomView.Draw because the BackgroundColor is null. This code worked fine before and is now not working in the latest version of Xamarin.iOS. Any ideas as to why this would occur? The problem is intermittent and only seems to occur with a release build on a real device. If I can't find a solution soon, is it possible to temporarily downgrade to the previous version? I need to finalize testing and publish soon.
Thanks