セクション内に要素を追加/削除するときに、セクション内にアニメーションを表示することができないかどうかは疑問です。またはセクション自体を追加/削除する場合でも。MonoTouch.Dialog行アニメーション
On ViewWillAppear私は、アプリケーションが終了/再開されたかどうかを確認するグローバルブールをチェックします。これにより、新しいデータがリロードされます。 (RefreshRequestedが設定されていますが、クライアントはこのようにしたがっています)。したがって、ViewWillAppearでは、UpdateCellsという関数を呼び出して、次のことを行います。
// Using Bottom animation as its the closest to none (none has no fade effects
// but makes solid cells move upwards in the TableView and then suddenly disappear)
Root.Remove(mySection1, UITableViewRowAnimation.Bottom);
Root.Remove(mySection2, UITableViewRowAnimation.Bottom);
mySection1.Clear();
mySection2.Clear();
// Load stuff from SQLite DB and populate sections. Adding looks like:
// if (isThisWeek)
// {
// section1.Insert(0, UITableViewRowAnimation.None, newElement);
// }
// else
// {
// section2.Insert(0. UITableViewRowAnimation.None, newElement);
// }
// Now finally add sections back into Root if there exists elements in them.
if (sectionThisWeek.Count > 0)
{
Root.Insert(1, UITableViewRowAnimation.None, sectionThisWeek);
}
if (sectionCommingUp.Count > 0)
{
Root.Insert(1, UITableViewRowAnimation.None, sectionCommingUp);
}
私は
...何とか..なしアニメーションでReloadComplete()を行い、その後、それを、DialogViewControllerでの作業を、すべてを一時停止し、ある種のために私は何を任意のアイデアを期待していました間違っている、または私がやろうとしていることをやるためのより良い方法。
これは完璧に機能しました!ありがとうミゲル。 –