public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
		{
			var t = taskList[indexPath.Row];
			todoVC = new TodoViewController (t);

			viewController.NavigationController.PushViewController (todoVC, true);
			tableView.DeselectRow (indexPath, true);
		}
Exemple #2
0
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            var t = taskList[indexPath.Row];

            todoVC = new TodoViewController(t);

            viewController.NavigationController.PushViewController(todoVC, true);
            tableView.DeselectRow(indexPath, true);
        }
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();

			addButton = new UIBarButtonItem(UIBarButtonSystemItem.Add, (s,e) =>{
				var todo = new Todo() {
					// TODO: iOS localize the placeholder text
					Title= Lion.Localize("<new task>", "<new task>") 
				};

				AppDelegate.Current.TodoDB.Save (todo);

				var todoView = new TodoViewController(todo);
				NavigationController.PushViewController (todoView, true);
			});
			NavigationItem.RightBarButtonItem = addButton;

		}
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            addButton = new UIBarButtonItem(UIBarButtonSystemItem.Add, (s, e) => {
                var todo = new Todo()
                {
                    // TODO: iOS localize the placeholder text
                    Title = Lion.Localize("<new task>", "<new task>")
                };

                AppDelegate.Current.TodoDB.Save(todo);

                var todoView = new TodoViewController(todo);
                NavigationController.PushViewController(todoView, true);
            });
            NavigationItem.RightBarButtonItem = addButton;
        }