Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lauren Caponong Assessment #20

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
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
64 changes: 52 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,57 @@
#Unit 3 Final App Assessment

**Topics covered**

* Autolayout / Custom UI
* `IBAction` / Storyboard segue
* `UITableView` / `UITableViewController` / `UITableViewCell`
* Cats
* Networking
* Parsing JSON
* Passing data b/w view controllers
* `UINavigationController`
* `NSUserDefaults`
* Protocols / Delegation
This part of the assessment contains 5 screens

**Screen 1**
This screen contains two buttons, one visible and one hidden.
*Requirements*
* Conform to the protocol created in screen 2 and implement all required methods.
* Segue to screen 3 (via the hidden button)

**Screen 2**
This screen contains three buttons: red, green, and blue.

*Requirements*
* Set constraints in the storyboard so that each button takes up equal space within the view (should work landscape)
* Implement a custom protocol (delegate). This protocol will have a single method for sending a single `UIColor` from screen 2 to its delegate.
Whenever the user selects a color button, the view controller will send the color (either `[UIColor redColor]`, `[UIColor greenColor]`,
or `[UIColor blueColor]`) to its delegate as a parameter. In this situation, the delegate will be screen 1.

** When the delegate (screen 1) receives a color, it should set its view's background color. When the correct color is selected the
hidden button will appear **

**Screen 3**
This screen is nothing more than a `UITableViewController`.

*Requirements*
* Populate the table with random cat facts. The API information is set for you at the top of `C4QCatFactsTableViewController.m`.
* Create a custom `UITableViewCell` with a + button on the right side (asset is already in the project).
* Save a cat fact in `NSUserDefaults` when the + button is tapped.
* The height of the cell should be variable based on the amount of text provided.

*Bonus*
* Present an alert whenever you save a cat fact
* Change the + button to a checkmark indicating that a fact is already saved

**Screen 4**
This is a very basic `UITableViewController`. Nothing more.

*Requirements*
* Display the saved cat facts.

**Screen 5**
This is a detail view for your cat facts. Tapping on a cell in screen 3 will segue to this screen.

*Requirements*
* Display a random cat photo in full screen in the background (API information is in `C4QCatFactsDetailViewController.m`).
* Display the text that corresponds with the cell tapped.
* The text must be centered vertically and have 40pts space on the left and right.
* The background image should have a content mode of aspect fill and SHOULD NOT overflow the view (when you
go back to the previous screen you shouldn't see part of the image)

*Bonus*
* Load the cat image on a background thread so that it doesn't freeze the UI
* If the image isn't downloaded by the time you hit the back button, cancel the download task.

**Bonus**

Expand Down
14 changes: 14 additions & 0 deletions unit-3-final-app-assessment.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
objects = {

/* Begin PBXBuildFile section */
89B7F1531C260E6200B45596 /* SavedCatFactsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 89B7F1521C260E6200B45596 /* SavedCatFactsTableViewController.m */; };
89B7F1571C2617F400B45596 /* CatFactTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 89B7F1561C2617F400B45596 /* CatFactTableViewCell.m */; };
8D610EA01C2477EB00AADDC2 /* C4QCatFactsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D610E951C2477EB00AADDC2 /* C4QCatFactsTableViewController.m */; };
8D610EA11C2477EB00AADDC2 /* C4QColorPickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D610E971C2477EB00AADDC2 /* C4QColorPickerViewController.m */; };
8D610EA21C2477EB00AADDC2 /* C4QRootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D610E991C2477EB00AADDC2 /* C4QRootViewController.m */; };
Expand All @@ -23,6 +25,10 @@
/* Begin PBXFileReference section */
4292FCC8B28330B5275CBFBD /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
4298908874A5133FD8BE086A /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
89B7F1511C260E6200B45596 /* SavedCatFactsTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SavedCatFactsTableViewController.h; sourceTree = "<group>"; };
89B7F1521C260E6200B45596 /* SavedCatFactsTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SavedCatFactsTableViewController.m; sourceTree = "<group>"; };
89B7F1551C2617F400B45596 /* CatFactTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CatFactTableViewCell.h; sourceTree = "<group>"; };
89B7F1561C2617F400B45596 /* CatFactTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CatFactTableViewCell.m; sourceTree = "<group>"; };
8D610E941C2477EB00AADDC2 /* C4QCatFactsTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = C4QCatFactsTableViewController.h; sourceTree = "<group>"; };
8D610E951C2477EB00AADDC2 /* C4QCatFactsTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = C4QCatFactsTableViewController.m; sourceTree = "<group>"; };
8D610E961C2477EB00AADDC2 /* C4QColorPickerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = C4QColorPickerViewController.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -102,8 +108,12 @@
8D610E971C2477EB00AADDC2 /* C4QColorPickerViewController.m */,
8D610E941C2477EB00AADDC2 /* C4QCatFactsTableViewController.h */,
8D610E951C2477EB00AADDC2 /* C4QCatFactsTableViewController.m */,
89B7F1511C260E6200B45596 /* SavedCatFactsTableViewController.h */,
89B7F1521C260E6200B45596 /* SavedCatFactsTableViewController.m */,
8DA03F721C2499F400328B53 /* C4QCatFactsDetailViewController.h */,
8DA03F731C2499F400328B53 /* C4QCatFactsDetailViewController.m */,
89B7F1551C2617F400B45596 /* CatFactTableViewCell.h */,
89B7F1561C2617F400B45596 /* CatFactTableViewCell.m */,
8D87530C1C24774700BBD328 /* Main.storyboard */,
8D87530F1C24774800BBD328 /* Assets.xcassets */,
8D8753031C24774700BBD328 /* Supporting Files */,
Expand Down Expand Up @@ -244,12 +254,14 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
89B7F1571C2617F400B45596 /* CatFactTableViewCell.m in Sources */,
8D8753081C24774700BBD328 /* AppDelegate.m in Sources */,
8D610EA01C2477EB00AADDC2 /* C4QCatFactsTableViewController.m in Sources */,
8D8753051C24774700BBD328 /* main.m in Sources */,
8DA03F741C2499F400328B53 /* C4QCatFactsDetailViewController.m in Sources */,
8D610EA41C2477EB00AADDC2 /* C4QViewController.m in Sources */,
8D610EA11C2477EB00AADDC2 /* C4QColorPickerViewController.m in Sources */,
89B7F1531C260E6200B45596 /* SavedCatFactsTableViewController.m in Sources */,
8D610EA21C2477EB00AADDC2 /* C4QRootViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -363,6 +375,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = "unit-3-final-app-assessment/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.mikekavouras.unit-3-final-app-assessment";
PRODUCT_NAME = "$(TARGET_NAME)";
};
Expand All @@ -375,6 +388,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = "unit-3-final-app-assessment/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.mikekavouras.unit-3-final-app-assessment";
PRODUCT_NAME = "$(TARGET_NAME)";
};
Expand Down
26 changes: 26 additions & 0 deletions unit-3-final-app-assessment/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
#Pods/
Loading