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

done #23

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

done #23

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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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
22 changes: 20 additions & 2 deletions unit-3-final-app-assessment.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
objects = {

/* Begin PBXBuildFile section */
5F367E5A1C25F338000A4C43 /* CustomCatTVCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F367E581C25F338000A4C43 /* CustomCatTVCell.m */; };
5F367E5B1C25F338000A4C43 /* CustomCatTVCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5F367E591C25F338000A4C43 /* CustomCatTVCell.xib */; };
5F367E5E1C271457000A4C43 /* CatSavedFactsTVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F367E5D1C271457000A4C43 /* CatSavedFactsTVC.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 +26,12 @@
/* 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>"; };
5F367E561C25D021000A4C43 /* ColorPickerCommunicationProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ColorPickerCommunicationProtocol.h; sourceTree = "<group>"; };
5F367E571C25F338000A4C43 /* CustomCatTVCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomCatTVCell.h; sourceTree = "<group>"; };
5F367E581C25F338000A4C43 /* CustomCatTVCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomCatTVCell.m; sourceTree = "<group>"; };
5F367E591C25F338000A4C43 /* CustomCatTVCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CustomCatTVCell.xib; sourceTree = "<group>"; };
5F367E5C1C271457000A4C43 /* CatSavedFactsTVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CatSavedFactsTVC.h; sourceTree = "<group>"; };
5F367E5D1C271457000A4C43 /* CatSavedFactsTVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CatSavedFactsTVC.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 @@ -96,14 +105,20 @@
children = (
8D8753061C24774700BBD328 /* AppDelegate.h */,
8D8753071C24774700BBD328 /* AppDelegate.m */,
5F367E561C25D021000A4C43 /* ColorPickerCommunicationProtocol.h */,
8D610E9C1C2477EB00AADDC2 /* C4QViewController.h */,
8D610E9D1C2477EB00AADDC2 /* C4QViewController.m */,
8D610E961C2477EB00AADDC2 /* C4QColorPickerViewController.h */,
8D610E971C2477EB00AADDC2 /* C4QColorPickerViewController.m */,
8D610E941C2477EB00AADDC2 /* C4QCatFactsTableViewController.h */,
8D610E951C2477EB00AADDC2 /* C4QCatFactsTableViewController.m */,
5F367E5C1C271457000A4C43 /* CatSavedFactsTVC.h */,
5F367E5D1C271457000A4C43 /* CatSavedFactsTVC.m */,
8DA03F721C2499F400328B53 /* C4QCatFactsDetailViewController.h */,
8DA03F731C2499F400328B53 /* C4QCatFactsDetailViewController.m */,
5F367E571C25F338000A4C43 /* CustomCatTVCell.h */,
5F367E581C25F338000A4C43 /* CustomCatTVCell.m */,
5F367E591C25F338000A4C43 /* CustomCatTVCell.xib */,
8D87530C1C24774700BBD328 /* Main.storyboard */,
8D87530F1C24774800BBD328 /* Assets.xcassets */,
8D8753031C24774700BBD328 /* Supporting Files */,
Expand Down Expand Up @@ -184,6 +199,7 @@
buildActionMask = 2147483647;
files = (
8D8753131C24774800BBD328 /* LaunchScreen.storyboard in Resources */,
5F367E5B1C25F338000A4C43 /* CustomCatTVCell.xib in Resources */,
8D8753101C24774800BBD328 /* Assets.xcassets in Resources */,
8D87530E1C24774700BBD328 /* Main.storyboard in Resources */,
);
Expand Down Expand Up @@ -245,7 +261,9 @@
buildActionMask = 2147483647;
files = (
8D8753081C24774700BBD328 /* AppDelegate.m in Sources */,
5F367E5A1C25F338000A4C43 /* CustomCatTVCell.m in Sources */,
8D610EA01C2477EB00AADDC2 /* C4QCatFactsTableViewController.m in Sources */,
5F367E5E1C271457000A4C43 /* CatSavedFactsTVC.m in Sources */,
8D8753051C24774700BBD328 /* main.m in Sources */,
8DA03F741C2499F400328B53 /* C4QCatFactsDetailViewController.m in Sources */,
8D610EA41C2477EB00AADDC2 /* C4QViewController.m in Sources */,
Expand Down Expand Up @@ -312,7 +330,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -349,7 +367,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
Expand Down
Loading