MvvmCross MonoTouch的 - 失败绑定一个真正的iPad的性能,但它工作在模拟器 [英] MvvmCross Monotouch - Fail to bind Properties on a real iPad, but it works on the Simulator

查看:88
本文介绍了MvvmCross MonoTouch的 - 失败绑定一个真正的iPad的性能,但它工作在模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我与MvvmCross MonoTouch的工作。

I am working with MvvmCross Monotouch.

下面是实际工作得非常好上了iOS模拟器绑定代码。

Here is the Binding Code that actually works very well on the iOS Simulator.

{ this, "{'Title':{'Path':'NavigationBarTitle'}}

然而,当我在我的真正的iPad(iPad 2的)来部署它,它不工作。

However, it does not work when I deploy it on my real iPad (iPad 2).

Application Output:
===================
MvxBind: Warning:   0.69 Failed to create target binding for from NavigationBarTitle to Title

我很高兴看到它工作在iOS模拟器,但没有任何理由为什么它不在真正的iPad上运行?

I am glad to see it works on the iOS Simulator but, is there any reason why it does not work on the real iPad?

帕特里克

推荐答案

的一种情况我见过发生在发布这种类型的错误的构建,其中MonoTouch的链接器优化图像大小和删除绑定所需的显然未使用的属性。

One situation I've seen this type of error occur in is in release builds where the monotouch linker optimises the image size and removes the apparently unused property required for binding.

要解决此,我一般包括代码假冒位链接诱骗包括所需的性能 - 例如,这里是由它来完成同样的事情一个MonoDroid的示例文件:

To workaround this, I generally include a fake bit of code to trick the linker into including the required properties - e.g. Here's a monodroid sample file which does the same sort of thing:

https://github.com/slodge/MvvmCross/blob/master/Sample%20-%20BestSellers/BestSellers/BestSellers.Droid/LinkerIncludePlease.cs < /一>

https://github.com/slodge/MvvmCross/blob/master/Sample%20-%20BestSellers/BestSellers/BestSellers.Droid/LinkerIncludePlease.cs

这是使用mvvmcross目前的缺点之一 - 它可以导致较大的二进制图像的尺寸

This is one of the disadvantages of using mvvmcross currently - it can lead to larger binary image sizes.

这篇关于MvvmCross MonoTouch的 - 失败绑定一个真正的iPad的性能,但它工作在模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆