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

			viewModel = App.ProfileViewModel;
			SetUpNickNameControls ();
			SetUpCollectionView ();
			SetUpAvatarControl ();

			spaceCalculator = new CollectionViewSpaceCalculator (CollectionView, AvatarCollectionViewCell.CellSize);
			gestureAttacher = new LongPressGestureAttacher (AvatarImg, TakeAvatar);
		}
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            viewModel = App.ProfileViewModel;
            SetUpNickNameControls();
            SetUpCollectionView();
            SetUpAvatarControl();

            spaceCalculator = new CollectionViewSpaceCalculator(CollectionView, AvatarCollectionViewCell.CellSize);
            gestureAttacher = new LongPressGestureAttacher(AvatarImg, TakeAvatar);
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            viewModel = App.FriendsViewModel;
            SetUpCollectionView();
            SetUpPullToRefresh();

            var layout = (UICollectionViewFlowLayout)CollectionView.CollectionViewLayout;

            layout.MinimumLineSpacing      = 0;
            layout.MinimumInteritemSpacing = 0;
            layout.SectionInset            = new UIEdgeInsets(10, 0, 0, 0);

            CollectionView.RegisterClassForCell(typeof(UICollectionViewFriendCell), UICollectionViewFriendCell.CellId);

            gestureAttacher = new LongPressGestureAttacher(CollectionView, (gesture) =>
            {
                var p         = gesture.LocationInView(CollectionView);
                var indexPath = CollectionView.IndexPathForItemAtPoint(p);
                if (indexPath == null)
                {
                    return;
                }
                var friend = viewModel.Friends[indexPath.Row];
                if (friend == null)
                {
                    return;
                }
                viewModel.ExecuteFlagFriendCommand(friend.FriendId, friend.Name);
            });

            var addFriend = new UIBarButtonItem(UIBarButtonSystemItem.Add, delegate {
                App.MessageDialog.SelectOption("Add Friend", new[] { "Enter Email", "Pick Contact" }, (which) =>
                {
                    if (which == 0)
                    {
                        App.MessageDialog.AskForString("Enter friend's email:", "Add Friend", (email) =>
                        {
                            viewModel.ExecuteSearchForFriendCommand(email);
                        });
                    }
                    else if (which == 1)
                    {
                        PresentViewController(AddressBookManager.PeoplePicker, true, null);
                    }
                }
                                               );
            });

            NavigationItem.RightBarButtonItem = addFriend;
        }
		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();

			viewModel = App.FriendsViewModel;
			SetUpCollectionView ();
			SetUpPullToRefresh ();

			var layout = (UICollectionViewFlowLayout)CollectionView.CollectionViewLayout;
			layout.MinimumLineSpacing = 0;
			layout.MinimumInteritemSpacing = 0;
			layout.SectionInset = new UIEdgeInsets (10, 0, 0, 0);

			CollectionView.RegisterClassForCell (typeof(UICollectionViewFriendCell), UICollectionViewFriendCell.CellId);

			gestureAttacher = new LongPressGestureAttacher (CollectionView, (gesture)=>
				{
					var p = gesture.LocationInView(CollectionView);
					var indexPath = CollectionView.IndexPathForItemAtPoint(p);
					if(indexPath == null)
						return;
					var friend = viewModel.Friends[indexPath.Row];
					if(friend == null)
						return;
					viewModel.ExecuteFlagFriendCommand(friend.FriendId, friend.Name);
				});

			var addFriend = new UIBarButtonItem (UIBarButtonSystemItem.Add, delegate {
				App.MessageDialog.SelectOption("Add Friend", new[]{"Enter Email", "Pick Contact"}, (which) =>
					{
						if(which == 0)
						{
							App.MessageDialog.AskForString("Enter friend's email:", "Add Friend", (email)=>
								{
									viewModel.ExecuteSearchForFriendCommand(email);
								});
						}
						else if(which == 1)
						{
							PresentViewController (AddressBookManager.PeoplePicker, true, null);
						}
					}
				);
			});
			NavigationItem.RightBarButtonItem = addFriend;
		}