Forum Xamarin.Forms

NullReferenceException with CustomRenderer in iPhone 4, iOS 7.1.2

The crash exception has:

System.NullReferenceException: Object reference not set to an instance of an object at Xamarin.Forms.Platform.iOS.RendererFactory.GetRenderer (Xamarin.Forms.VisualElement view) [0x00000] in :0 at Xamarin.Forms.Platform.iOS.ListViewRenderer+UnevenListViewDataSource.GetHeightForRow (UIKit.UITableView tableView, Foundation.NSIndexPath indexPath) [0x00000] in :0 at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr) at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00000] in :0 at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00000] in :0 at TVD.iOS.Application.Main (System.String[] args) [0x00000] in :0

We have:

<ListView.ItemTemplate> <DataTemplate> <custom:ListItemView /> </DataTemplate> </ListView.ItemTemplate>

public class ListItemView : ViewCell

[assembly: ExportRenderer(typeof(ListItemView), typeof(ListItemViewCellRenderer))] . . . public class ListItemViewCellRenderer : ViewCellRenderer

Is iPhone 4 a special case?

Posts

Sign In or Register to comment.