示例#1
0
        public override UICollectionViewCell GetCell(UICollectionView collectionView, NSIndexPath indexPath)
        {
            if (indexPath.Item == 0)
            {
                // First cell is the adding item
                return(FriendsPuzzleListNewCellViewController.Create());
            }
            else
            {
//				var cell = collectionView.DequeueReusableCell (FriendsPuzzleListCellViewController.Key, indexPath) as FriendsPuzzleListCellViewController;

                // Get puzzle
                // Index - 1 because the first cell if for the adding thing
                var puzzle = puzzlesWitHFriends [indexPath.Item - 1];

                // Create cell
                var cell = FriendsPuzzleListCellViewController.Create(puzzle);

                return(cell);
            }
        }
示例#2
0
        public static FriendsPuzzleListCellViewController Create(PuzzleData puzzle)
        {
            FriendsPuzzleListCellViewController cell = Nib.Instantiate(null, null) [0] as FriendsPuzzleListCellViewController;

            return(cell);
        }