Custom components are not being rendered because p

2019-07-27 09:57发布

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.

Screenshot of the log file

1条回答
来,给爷笑一个
2楼-- · 2019-07-27 10:24

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

查看更多
登录 后发表回答