Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

NullReferenceException with CustomRenderer in iPhone 4, iOS 7.1.2

$
0
0

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?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>