我有問題,iOS上的SfDataGrid在Android上正常工作時,當我嘗試導航到一個名爲「Hovedside」,有一個SfDataGrid 它進入頁面Main.cs
在iOS的一部分,並在 UIApplication.Main(args, null, "AppDelegate");
iOS中的AppDelegate導航到頁面上的SfDataGrid時失敗
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
namespace PrismUnityApp2.iOS
{
public class Application
{
// This is the main entry point of the application.
static void Main(string[] args)
{
try
{
UIApplication.Main(args, null, "AppDelegate");
}
catch (Exception e)
{
throw;
}
}
}
}
失敗,此輸出:
System.NullReferenceException: Object reference not set to an instance of an object
at Syncfusion.SfDataGrid.XForms.iOS.ExtendedScrollViewRenderer.WillMoveToWindow (UIKit.UIWindow window) [0x0000b] in <eee3a5d11e6d415a9b8017bfe242a045>:0
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/3818/3983064a/source/xamarin-macios/src/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/3818/3983064a/source/xamarin-macios/src/UIKit/UIApplication.cs:63
at PrismUnityApp2.iOS.Application.Main (System.String[] args) [0x00002] in C:\Users\asr\Desktop\GBS APP bakups\PrismUnityApp2 b4 scanner\PrismUnityApp2\PrismUnityApp2.iOS\Main.cs:20
沒有什麼錯誤列表
如果我刪除SfDataGrid然後導航蠻好的頁面
我有所需的組件,其syncfusion上 https://help.syncfusion.com/xamarin/sfdatagrid/getting-started
我覺得我在想念中的AppDelegate東西說明,但無法找出什麼它可以使用Visual Studio的2015年社區,xamarin是
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
using Prism.Unity;
using Microsoft.Practices.Unity;
using Syncfusion.SfDataGrid.XForms.iOS;
namespace PrismUnityApp2.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 : 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)
{
ZXing.Net.Mobile.Forms.iOS.Platform.Init();
global::Xamarin.Forms.Forms.Init();
SfDataGridRenderer.Init();
LoadApplication(new App(new iOSInitializer()));
return base.FinishedLaunching(app, options);
}
}
public class iOSInitializer : IPlatformInitializer
{
public void RegisterTypes(IUnityContainer container)
{
}
}
}
https://github.com/ZarpGitHub/PrismUnityApp-gbs
IM,PR ism v6.2.0 Xam.Plugin.Geolocator v3.0.4和Syncfusion 14.3451.0.49。 大多運行它搭載Android 6.0.1版本一個索尼XPERIA Z3和使用 API 23 我還用它測試的虛擬iphone 6S加IOS 10.0
任何幫助深表讚賞
非常感謝你Divakar 我終於更新,它的工作很棒 – Zarp