简体   繁体   English

由于检测到问题,因此未呈现自定义组件

[英]Custom components are not being rendered because problems were detected

I'm building an app on visual studio xamarin.ios but the story board opens up with this message "custom components are not being rendered because problems were detected". 我在Visual Studio xamarin.ios上构建了一个应用程序,但故事板打开时显示以下消息:“由于检测到问题,未呈现自定义组件”。

I've tried deleting directories named "bin" and "obj" in the project's folder yet the problem persists. 我尝试删除项目文件夹中名为“ bin”和“ obj”的目录,但问题仍然存在。 Also a log file comes up saying "MonoTouchDesignServerUnified quit unexpectedly". 还会出现一个日志文件,提示“ MonoTouchDesignServerUnified意外退出”。

Here is a screenshot of the log file. 这是日志文件的屏幕截图。

日志文件的屏幕截图

There is a bug in current version of Xamarin on how it handle the UIViewController define in storyboard. 当前版本的Xamarin中存在一个有关如何处理情节UIViewController中的UIViewController定义的错误。 Apparently if the UIViewController define in storyboard, it will add as a custom component. 显然,如果UIViewController在情节UIViewController定义,它将添加为自定义组件。 Hence, it will try to execute the code in ViewDidLoad, ViewWillAppear... when the storyboard is open. 因此,当情节ViewDidLoad, ViewWillAppear...板打开时,它将尝试在ViewDidLoad, ViewWillAppear...执行代码。

The solution temporary is set the flag DesignTimeVisible to false for those UIViewController that is define in storyboard. 对于在情节UIViewController中定义的UIViewController ,将解决方案临时设置为将标志DesignTimeVisible设置为false。 Xamarin already said that it is fixed and will release in coming version. Xamarin已经表示它已修复,并将在以后的版本中发布。

[System.ComponentModel.DesignTimeVisible(false)]
public partial class AAAViewController : UIViewController

You can refer for more detail in my blog HERE 你可以在我的博客参考更多详细HERE

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Xamarin 在设计器中预览时形成小写按钮? (未呈现自定义组件) - Xamarin forms lower case button on preview in designer? (Custom components are not being rendered) 未检测到已安装的组件。 元素已经是另一个元素的子元素 - No installed components were detected. Element is already the child of another element 使用视觉状态切换 AppBarButton 可见性时出现“未检测到已安装的组件”错误 - “No installed components were detected” error on toggling AppBarButton visibility with Visual States 自定义角色提供者。 未检测到用户名 - Custom Role Provider. Username not being detected 检测到行。 架构更新正在终止,因为可能会发生数据丢失 - Rows were detected. The schema update is terminating because data loss might occur 升级到Fall Creators会导致UWP动画失败,并显示“未检测到已安装的组件。 未指定动画目标。” - Upgrading to Fall Creators causes UWP animation to fail with “No installed components were detected. Animation target not specified.” C#-WinRT信息:元素已经是另一个元素的子级。 附加信息:未检测到已安装的组件 - C# - WinRT information: Element is already the child of another element. Additional information: No installed components were detected 内容管理器未检测到 Monogame 自定义导入器/处理器 - Monogame Custom Importer/Processor not being detected by Content Manager 未检测到xml属性 - xml attributes not being detected UITableViewCell 未正确呈现 - UITableViewCell not being rendered correctly
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM