iOS 设计师没有渲染故事板
iOS designer not rendering storyboard
在 Xamarin.IOS 编辑器中我得到这个错误:
"There was a problem parsing the XML in this document"
System.NullReferenceException: Object reference not set to an instance of an object
at MonoTouch.Design.ProxiedView.set_UseSafeArea (System.Boolean value) [0x00001] in /Users/vsts/agent/2.154.3/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/ProxiedView.cs:944
at MonoTouch.Design.ProxiedViewController.UpdateLayoutGuides (MonoTouch.Design.Catalog utilityCatalog, MonoTouch.Design.IosDocument rootModel) [0x002ac] in /Users/vsts/agent/2.154.3/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/ProxiedViewController.cs:238
at MonoTouch.Design.Storyboard.UpdateLayoutGuides (MonoTouch.Design.Catalog utilityCatalog) [0x00017] in /Users/vsts/agent/2.154.3/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Storyboard.cs:132
at MonoTouch.Design.Client.IPhoneDesignerSession.LoadXml (System.Func`1[TResult] getDoc, System.Boolean shouldTryUpgrade, System.String fileName) [0x00310] in /Users/vsts/agent/2.154.3/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/IPhoneDesignerSession.cs:466
我尝试禁用某些东西并回顾我在制作故事板时所做的每一步,唯一成功一半的是禁用自动布局,但它破坏了我的布局。
问题是它在应用程序和 xcode 中完美运行,但在 VS iOS 设计器中它不起作用,我需要它添加组件的 ID 以使用它们我的 ViewController,在我的项目中,这是添加 id 的唯一方法。
我迷路了,如果你需要任何额外的信息问我,我粘贴了日志的重要(或者我认为)部分,它们太长了。
这是完美运行的故事板的 iPad 版本,它基于该故事板(复制并粘贴然后编辑以适合 iPad)
你的文件的问题是你有与 safeArea 相关的约束,但它没有在文件中打开。
我在 Xcode 中打开文件并打开时修复了它(检查图像)
结果 useSafeAreas="YES"
添加到 xml
第二行的文档标签
请仔细检查您的约束,其中一些可能已被破坏或删除。
在 Xamarin.IOS 编辑器中我得到这个错误:
"There was a problem parsing the XML in this document"
System.NullReferenceException: Object reference not set to an instance of an object
at MonoTouch.Design.ProxiedView.set_UseSafeArea (System.Boolean value) [0x00001] in /Users/vsts/agent/2.154.3/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/ProxiedView.cs:944
at MonoTouch.Design.ProxiedViewController.UpdateLayoutGuides (MonoTouch.Design.Catalog utilityCatalog, MonoTouch.Design.IosDocument rootModel) [0x002ac] in /Users/vsts/agent/2.154.3/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/ProxiedViewController.cs:238
at MonoTouch.Design.Storyboard.UpdateLayoutGuides (MonoTouch.Design.Catalog utilityCatalog) [0x00017] in /Users/vsts/agent/2.154.3/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Shared/Storyboard.cs:132
at MonoTouch.Design.Client.IPhoneDesignerSession.LoadXml (System.Func`1[TResult] getDoc, System.Boolean shouldTryUpgrade, System.String fileName) [0x00310] in /Users/vsts/agent/2.154.3/work/1/s/Xamarin.Designer.iOS/MonoTouch.Design.Client/IPhoneDesignerSession.cs:466
我尝试禁用某些东西并回顾我在制作故事板时所做的每一步,唯一成功一半的是禁用自动布局,但它破坏了我的布局。 问题是它在应用程序和 xcode 中完美运行,但在 VS iOS 设计器中它不起作用,我需要它添加组件的 ID 以使用它们我的 ViewController,在我的项目中,这是添加 id 的唯一方法。
我迷路了,如果你需要任何额外的信息问我,我粘贴了日志的重要(或者我认为)部分,它们太长了。
这是完美运行的故事板的 iPad 版本,它基于该故事板(复制并粘贴然后编辑以适合 iPad)
你的文件的问题是你有与 safeArea 相关的约束,但它没有在文件中打开。
我在 Xcode 中打开文件并打开时修复了它(检查图像)
结果 useSafeAreas="YES"
添加到 xml
请仔细检查您的约束,其中一些可能已被破坏或删除。