2
我使用基于这篇文章的设置我的MonoTouch iPhone应用程序root.plist文件:Hidding场
http://adtmag.com/articles/2010/04/13/working-with-application-settings-in-monotouch.aspx
我们怎样才能有一个字段,默认情况下是不可见的和基于条件的应用程序可以改变可视性吗?
我使用基于这篇文章的设置我的MonoTouch iPhone应用程序root.plist文件:Hidding场
http://adtmag.com/articles/2010/04/13/working-with-application-settings-in-monotouch.aspx
我们怎样才能有一个字段,默认情况下是不可见的和基于条件的应用程序可以改变可视性吗?
默认隐藏设置。
如果你这样做:
var defaults = NSUserDefaults.StandardDefaults;
defaults.SetInt(21, "TestInt");
defaults.Synchronize();
Assert.That(defaults.IntForKey("TestInt"), Is.EqualTo(21));
它将如果你在你的plist文件不设置任何被完全隐藏。 (注意:我在这里使用的是NUnit)
所以如果你想隐藏某些东西,不要将值添加到你的Settings.bundle或Root.plist。
为什么不将您的monotouch应用程序的设置存储在sqlite数据库中?它比plist-files更灵活。示例:http://stackoverflow.com/a/14322497/548395 – 2013-03-18 07:28:48