Skip to content

Instantly share code, notes, and snippets.

/foo.diff Secret

Created January 23, 2015 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/6fbc365b273bbbb1a2ef to your computer and use it in GitHub Desktop.
Save anonymous/6fbc365b273bbbb1a2ef to your computer and use it in GitHub Desktop.
diff --git a/Tasky/TaskyiOS/Screens/controller_iPhone.cs b/Tasky/TaskyiOS/Screens/controller_iPhone.cs
index 214be9f..7c3d462 100644
--- a/Tasky/TaskyiOS/Screens/controller_iPhone.cs
+++ b/Tasky/TaskyiOS/Screens/controller_iPhone.cs
@@ -18,6 +18,7 @@ namespace Tasky.Screens {
protected void Initialize()
{
+ Root = new RootElement ("Tasky");
NavigationItem.SetRightBarButtonItem (new UIBarButtonItem (UIBarButtonSystemItem.Add), false);
NavigationItem.RightBarButtonItem.Clicked += (sender, e) => { ShowTaskDetails(new Task()); };
}
@@ -69,12 +70,12 @@ namespace Tasky.Screens {
{
tasks = BL.Managers.TaskManager.GetTasks ().ToList ();
var newTask = NSBundle.MainBundle.LocalizedString ("<new task>", "<new task>");
- Root = new RootElement ("Tasky") {
- new Section() {
- from t in tasks
- select (Element) new CheckboxElement((t.Name == "" ? newTask : t.Name), t.Done)
- }
- };
+
+ Root.Clear ();
+ Root.Add (new Section() {
+ from t in tasks
+ select (Element) new CheckboxElement((t.Name == "" ? newTask : t.Name), t.Done)
+ });
}
public override void Selected (NSIndexPath indexPath)
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment