[英]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.