Hi -
I've created a very simple project (Xamarin Forms PCL with iOS and Android) and am having trouble with the iOS portion for the Telerik ListView.
The project is on GitHub here and should be runnable -- it runs correctly on Android, and also runs on iOS but the ListView is not rendered:
https://github.com/dahlsailrunner/TelerikSample
Here are some notes about the project:
* It uses Prism for MVVM and all refs are added
* It uses XLabs to use some other controls like ImageButton and Checkbox which are more feature-rich than core Xamarin Forms at this point
* It has the refs for Telerik as described in the Getting Started article for Xamarin Forms ListView.
The MainPage is loaded at startup by the Prism Bootstrapper class, and the ViewModel with it also gets instantiated properly. I have some mocked data returned and am trying to display it in a list view when the MainPage displays. This works perfectly on Android.
On iOS, I can't get it to work. My AppDelegate.cs is shown below. If I comment in the ExportRenderer line, the app fails to start with a "obj cannot be null" error (this should be easily reproduced if you like via the GitHub source - which should be runnable assuming you have the refs taken care of.
I believe it's not working because I haven't been able to properly export the ListView Renderer for iOS, but I'm not sure why that doesn't work.
Any help / guidance is appreciated.
-Erik
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
Foundation;
using
UIKit;
using
XLabs.Forms;
using
Xamarin.Forms;
using
Xamarin.Forms.Platform.iOS;
using
Telerik.XamarinForms.DataControlsRenderer.iOS;
//[assembly: Xamarin.Forms.ExportRenderer(typeof(Telerik.XamarinForms.DataControls.RadListView), typeof(Telerik.XamarinForms.DataControlsRenderer.iOS.ListViewRenderer))]
namespace
TelerikSample.iOS
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
// application events from iOS.
[Register(
"AppDelegate"
)]
public
partial
class
AppDelegate : FormsApplicationDelegate
//XFormsApplicationDelegate//global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
//
// This method is invoked when the application has loaded and is ready to run. In this
// method you should instantiate the window, load the UI into it and then make the window
// visible.
//
// You have 17 seconds to return from this method, or iOS will terminate your application.
//
public
override
bool
FinishedLaunching(UIApplication app, NSDictionary options)
{
new
Telerik.XamarinForms.DataControlsRenderer.iOS.ListViewRenderer();
Forms.Init();
LoadApplication(
new
App());
return
base
.FinishedLaunching(app, options);
}
}
}