Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 72 additions & 8 deletions Shopping List.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,28 @@

/* Begin PBXBuildFile section */
4613E91221143BFC00E7FF73 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4613E91121143BFC00E7FF73 /* AppDelegate.swift */; };
4613E91421143BFC00E7FF73 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4613E91321143BFC00E7FF73 /* ViewController.swift */; };
4613E91721143BFC00E7FF73 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4613E91521143BFC00E7FF73 /* Main.storyboard */; };
4613E91921143BFD00E7FF73 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4613E91821143BFD00E7FF73 /* Assets.xcassets */; };
4613E91C21143BFD00E7FF73 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4613E91A21143BFD00E7FF73 /* LaunchScreen.storyboard */; };
4BBA772224782E7E007F96A9 /* ShoppingItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BBA772124782E7E007F96A9 /* ShoppingItem.swift */; };
4BBA772424783313007F96A9 /* ShoppingListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BBA772324783313007F96A9 /* ShoppingListController.swift */; };
4BBA772624783803007F96A9 /* ShoppingListCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BBA772524783803007F96A9 /* ShoppingListCollectionViewController.swift */; };
4BBA772824783845007F96A9 /* GroceryItemCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BBA772724783845007F96A9 /* GroceryItemCollectionViewCell.swift */; };
4BBA772A24783873007F96A9 /* GroceryItemDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BBA772924783873007F96A9 /* GroceryItemDetailViewController.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
4613E90E21143BFC00E7FF73 /* Shopping List.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Shopping List.app"; sourceTree = BUILT_PRODUCTS_DIR; };
4613E91121143BFC00E7FF73 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
4613E91321143BFC00E7FF73 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
4613E91621143BFC00E7FF73 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
4613E91821143BFD00E7FF73 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
4613E91B21143BFD00E7FF73 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
4613E91D21143BFD00E7FF73 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4BBA772124782E7E007F96A9 /* ShoppingItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingItem.swift; sourceTree = "<group>"; };
4BBA772324783313007F96A9 /* ShoppingListController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingListController.swift; sourceTree = "<group>"; };
4BBA772524783803007F96A9 /* ShoppingListCollectionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingListCollectionViewController.swift; sourceTree = "<group>"; };
4BBA772724783845007F96A9 /* GroceryItemCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroceryItemCollectionViewCell.swift; sourceTree = "<group>"; };
4BBA772924783873007F96A9 /* GroceryItemDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroceryItemDetailViewController.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -54,16 +62,68 @@
4613E91021143BFC00E7FF73 /* Shopping List */ = {
isa = PBXGroup;
children = (
4613E91121143BFC00E7FF73 /* AppDelegate.swift */,
4613E91321143BFC00E7FF73 /* ViewController.swift */,
4613E91521143BFC00E7FF73 /* Main.storyboard */,
4613E91821143BFD00E7FF73 /* Assets.xcassets */,
4613E91A21143BFD00E7FF73 /* LaunchScreen.storyboard */,
4BBA773024783D5F007F96A9 /* Resources */,
4BBA772F24783D55007F96A9 /* Stroyboards */,
4BBA772B24783CBB007F96A9 /* View Controllers */,
4BBA772C24783CEA007F96A9 /* Views */,
4BBA772D24783D1D007F96A9 /* Models */,
4BBA772E24783D26007F96A9 /* Model Controllers */,
4613E91D21143BFD00E7FF73 /* Info.plist */,
);
path = "Shopping List";
sourceTree = "<group>";
};
4BBA772B24783CBB007F96A9 /* View Controllers */ = {
isa = PBXGroup;
children = (
4BBA772924783873007F96A9 /* GroceryItemDetailViewController.swift */,
4BBA772524783803007F96A9 /* ShoppingListCollectionViewController.swift */,
);
path = "View Controllers";
sourceTree = "<group>";
};
4BBA772C24783CEA007F96A9 /* Views */ = {
isa = PBXGroup;
children = (
4BBA772724783845007F96A9 /* GroceryItemCollectionViewCell.swift */,
);
path = Views;
sourceTree = "<group>";
};
4BBA772D24783D1D007F96A9 /* Models */ = {
isa = PBXGroup;
children = (
4BBA772124782E7E007F96A9 /* ShoppingItem.swift */,
);
path = Models;
sourceTree = "<group>";
};
4BBA772E24783D26007F96A9 /* Model Controllers */ = {
isa = PBXGroup;
children = (
4BBA772324783313007F96A9 /* ShoppingListController.swift */,
);
path = "Model Controllers";
sourceTree = "<group>";
};
4BBA772F24783D55007F96A9 /* Stroyboards */ = {
isa = PBXGroup;
children = (
4613E91521143BFC00E7FF73 /* Main.storyboard */,
4613E91A21143BFD00E7FF73 /* LaunchScreen.storyboard */,
);
path = Stroyboards;
sourceTree = "<group>";
};
4BBA773024783D5F007F96A9 /* Resources */ = {
isa = PBXGroup;
children = (
4613E91121143BFC00E7FF73 /* AppDelegate.swift */,
4613E91821143BFD00E7FF73 /* Assets.xcassets */,
);
path = Resources;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -135,7 +195,11 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4613E91421143BFC00E7FF73 /* ViewController.swift in Sources */,
4BBA772624783803007F96A9 /* ShoppingListCollectionViewController.swift in Sources */,
4BBA772224782E7E007F96A9 /* ShoppingItem.swift in Sources */,
4BBA772A24783873007F96A9 /* GroceryItemDetailViewController.swift in Sources */,
4BBA772424783313007F96A9 /* ShoppingListController.swift in Sources */,
4BBA772824783845007F96A9 /* GroceryItemCollectionViewCell.swift in Sources */,
4613E91221143BFC00E7FF73 /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
24 changes: 0 additions & 24 deletions Shopping List/Base.lproj/Main.storyboard

This file was deleted.

26 changes: 26 additions & 0 deletions Shopping List/Model Controllers/ShoppingListController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// ShoppingListController.swift
// Shopping List
//
// Created by Ian Becker on 5/22/20.
// Copyright © 2020 Lambda School. All rights reserved.
//

import UIKit

class ShoppingListController {

var groceryItems: [ShoppingItem] {

let itemNames = [ShoppingItem(groceryItem: "Apple"),
ShoppingItem(groceryItem: "Grapes"),
ShoppingItem(groceryItem: "Milk"),
ShoppingItem(groceryItem: "Muffin"),
ShoppingItem(groceryItem: "Popcorn"),
ShoppingItem(groceryItem: "Soda"),
ShoppingItem(groceryItem:"Strawberries")]

return itemNames

}
}
18 changes: 18 additions & 0 deletions Shopping List/Models/ShoppingItem.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// ShoppingItem.swift
// Shopping List
//
// Created by Ian Becker on 5/22/20.
// Copyright © 2020 Lambda School. All rights reserved.
//

import UIKit

struct ShoppingItem {
var groceryItem: String
var hasBeenAdded: Bool = false

var image: UIImage {
return UIImage(named: groceryItem)!
}
}
Loading