1
我試圖在單擊單元格時使用LoadMoreElement對象來顯示活動指示器。下面的代碼有效,但是NavigationController對象長時間運行,活動指示器僅在NavigationController完成其工作後才顯示。這種做法違背了活動指示器的觀點,因爲應用似乎掛起一段時間,然後在屏幕上閃爍。代理上的MonoTouch.Dialog LoadMoreElement阻塞
我認爲NavigationController對象被阻塞,這就是爲什麼AcitivityIndicator沒有顯示。我應該使用線程來讓它在後臺完成嗎?任何幫助將不勝感激!
var loadMore = new LoadMoreElement();
loadMore.Caption = "Ratios";
loadMore.NormalCaption = "Ratios";
loadMore.LoadingCaption = "Loading Ratios...";
loadMore.Tapped += delegate { loadMore.Animating = true; NavigationController.PushViewController(new FileListController(), true); };
loadMore.Font = UIFont.FromName("Arial", 10);
loadMore.TextColor = UIColor.Black;
Root.Add(new Section() {
loadMore
});