Forum Xamarin.iOS

NullReference exception to View object

VelocityVelocity NZMember ✭✭✭

Weird one this.
Getting a non-consistent "NullReferenceException" on the public View object inside a VC.

Here's the line of code - this is being executed after View has loaded, and not inside ViewDidLoad/ViewWillAppear etc.
View is null. Doesn't happen every time this is executed, just occasionally. Any ideas?

sgListings = new ListingsGrid(new RectangleF(10, 10, View.Bounds.Size.Width-20, View.Bounds.Size.Height-20));

Sign In or Register to comment.