Custom components are not being rendered because problems were detected

℡╲_俬逩灬. 提交于 2019-12-11 05:28:38

问题


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".

I've tried deleting directories named "bin" and "obj" in the project's folder yet the problem persists. Also a log file comes up saying "MonoTouchDesignServerUnified quit unexpectedly".

Here is a screenshot of the log file.


回答1:


There is a bug in current version of Xamarin on how it handle the UIViewController define in storyboard. Apparently if the UIViewController define in storyboard, it will add as a custom component. Hence, it will try to execute the code in ViewDidLoad, ViewWillAppear... when the storyboard is open.

The solution temporary is set the flag DesignTimeVisible to false for those UIViewController that is define in storyboard. Xamarin already said that it is fixed and will release in coming version.

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

You can refer for more detail in my blog HERE



来源:https://stackoverflow.com/questions/47369386/custom-components-are-not-being-rendered-because-problems-were-detected

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!