StoryboardTable.MasterViewController.CreateTask C# (CSharp) 메소드

CreateTask() 공개 메소드

public CreateTask ( ) : void
리턴 void
		public void CreateTask ()
		{
			// first, add the task to the underlying data
			var newId = chores[chores.Count - 1].Id + 1;
			var newChore = new Chore(){Id=newId};
			chores.Add (newChore);

			// then open the detail view to edit it
			var detail = Storyboard.InstantiateViewController("detail") as TaskDetailViewController;
			detail.SetTask (this, newChore);
			NavigationController.PushViewController (detail, true);
		}