我正在尝试使用MonoTouch/MonoDevelop 在一个小型测试应用程序中运行iPhone设置.它可能是Xcode中的超级基础/基础......
... ...但是我没有立即看到如何做到在MonoTouch的例子,后一点阅读猜到是一位Settings.bundle在包含一个我的MonoDevelop解决方案的根文件夹中root.plist的XML文件应该工作.
它有点 - 我的应用程序现在出现在设置窗口 - 但实际输入没有显示.我已经尝试了一些不同的东西plist(来自谷歌和开始的iPhone开发书)但到目前为止没有运气.
有人能指出我错过了什么:要么是MonoTouch解决方案/构建过程中的一步还是错误我root.plist文件的格式/内容?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Title</key>
<string>iSOFlair</string>
<key>StringsTable</key>
<string>Root</string>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>Title</key>
<string>User Id</string>
<key>Key</key>
<string>soUserId</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
</dict>
</array>
</dict>
</plist>
Run Code Online (Sandbox Code Playgroud) 我正在制作地图上的"种族"动画.比赛需要45分钟,但动画运行60秒.
您可以观看2008 City2Surf比赛演示,了解我的意思.
在左上角的"种族时钟"必须显示"实时",并且必须是建立在.xaml.cs与System.Windows.Threading.DispatcherTimer这似乎是一个黑客攻击的一位.
我想也许动画上有DependencyProperty而不仅仅是StoryBoard.GetCurrentTime(),但我必须这样做
// SET UP AND START TIMER, before StoryBoard.Begin()
dt = new System.Windows.Threading.DispatcherTimer();
dt.Interval = new TimeSpan(0, 0, 0, 0, 100); // 0.1 second
dt.Tick +=new EventHandler(dt_Tick);
winTimeRatio = (realWinTime.TotalSeconds * 1.0) / animWinTime.TotalSeconds;
dt.Start();
Run Code Online (Sandbox Code Playgroud)
然后是Tick事件处理程序
void dt_Tick(object sender, EventArgs e)
{
var sb = LayoutRoot.Resources["Timeline"] as Storyboard;
TimeSpan ts = sb.GetCurrentTime();
TimeSpan toDisplay = new TimeSpan(0,0,
Convert.ToInt32(ts.TotalSeconds * winTimeRatio));
RaceTimeText.Text = toDisplay.ToString();
} …Run Code Online (Sandbox Code Playgroud)