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

submission #5

Open
wants to merge 1 commit 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
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pod 'AFNetworking', '~> 3.0'
pod 'AFNetworking', '~> 3.0'
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
AFNetworking: a0075feb321559dc78d9d85b55d11caa19eabb93

COCOAPODS: 0.39.0
COCOAPODS: 0.38.2

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

2 changes: 1 addition & 1 deletion Pods/Manifest.lock

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

616 changes: 305 additions & 311 deletions Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

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

6 changes: 1 addition & 5 deletions Pods/Target Support Files/AFNetworking/AFNetworking.xcconfig

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

84 changes: 0 additions & 84 deletions Pods/Target Support Files/Pods/Pods-frameworks.sh

This file was deleted.

2 changes: 1 addition & 1 deletion Pods/Target Support Files/Pods/Pods-resources.sh

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

/* Begin PBXBuildFile section */
6928B5C41C25D1F000AAB8DA /* C4QCatFactTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6928B5C31C25D1F000AAB8DA /* C4QCatFactTableViewCell.m */; };
6928B5C61C25E22400AAB8DA /* C4QCatFactTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6928B5C51C25E22400AAB8DA /* C4QCatFactTableViewCell.xib */; };
6928B5C81C25F1C900AAB8DA /* Checkmark-25.png in Resources */ = {isa = PBXBuildFile; fileRef = 6928B5C71C25F1C900AAB8DA /* Checkmark-25.png */; };
6928B5CA1C25F57000AAB8DA /* Checkmark-32.png in Resources */ = {isa = PBXBuildFile; fileRef = 6928B5C91C25F57000AAB8DA /* Checkmark-32.png */; };
6928B5CE1C2601FC00AAB8DA /* C4QSavedCatFactsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6928B5CD1C2601FC00AAB8DA /* C4QSavedCatFactsTableViewController.m */; };
6928B5D11C2606CB00AAB8DA /* UIImage+animatedGIF.m in Sources */ = {isa = PBXBuildFile; fileRef = 6928B5D01C2606CB00AAB8DA /* UIImage+animatedGIF.m */; };
6928B5D31C260C7C00AAB8DA /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6928B5D21C260C7C00AAB8DA /* ImageIO.framework */; };
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 +30,18 @@
/* 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>"; };
6928B5C11C25C26100AAB8DA /* C4QColorPickerViewControllerDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = C4QColorPickerViewControllerDelegate.h; sourceTree = "<group>"; };
6928B5C21C25D1F000AAB8DA /* C4QCatFactTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = C4QCatFactTableViewCell.h; sourceTree = "<group>"; };
6928B5C31C25D1F000AAB8DA /* C4QCatFactTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = C4QCatFactTableViewCell.m; sourceTree = "<group>"; };
6928B5C51C25E22400AAB8DA /* C4QCatFactTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = C4QCatFactTableViewCell.xib; sourceTree = "<group>"; };
6928B5C71C25F1C900AAB8DA /* Checkmark-25.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Checkmark-25.png"; sourceTree = "<group>"; };
6928B5C91C25F57000AAB8DA /* Checkmark-32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Checkmark-32.png"; sourceTree = "<group>"; };
6928B5CB1C25F70000AAB8DA /* C4QCatFactTableViewCellDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = C4QCatFactTableViewCellDelegate.h; sourceTree = "<group>"; };
6928B5CC1C2601FC00AAB8DA /* C4QSavedCatFactsTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = C4QSavedCatFactsTableViewController.h; sourceTree = "<group>"; };
6928B5CD1C2601FC00AAB8DA /* C4QSavedCatFactsTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = C4QSavedCatFactsTableViewController.m; sourceTree = "<group>"; };
6928B5CF1C2606CB00AAB8DA /* UIImage+animatedGIF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+animatedGIF.h"; sourceTree = "<group>"; };
6928B5D01C2606CB00AAB8DA /* UIImage+animatedGIF.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+animatedGIF.m"; sourceTree = "<group>"; };
6928B5D21C260C7C00AAB8DA /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; };
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 All @@ -49,6 +68,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
6928B5D31C260C7C00AAB8DA /* ImageIO.framework in Frameworks */,
DD8FD6DEC146B4B1C1F45D98 /* libPods.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -68,6 +88,7 @@
4E15730958CE00A7A68699CF /* Frameworks */ = {
isa = PBXGroup;
children = (
6928B5D21C260C7C00AAB8DA /* ImageIO.framework */,
A44461502C751D156694EAA4 /* libPods.a */,
);
name = Frameworks;
Expand Down Expand Up @@ -96,12 +117,21 @@
children = (
8D8753061C24774700BBD328 /* AppDelegate.h */,
8D8753071C24774700BBD328 /* AppDelegate.m */,
6928B5CF1C2606CB00AAB8DA /* UIImage+animatedGIF.h */,
6928B5D01C2606CB00AAB8DA /* UIImage+animatedGIF.m */,
8D610E9C1C2477EB00AADDC2 /* C4QViewController.h */,
8D610E9D1C2477EB00AADDC2 /* C4QViewController.m */,
8D610E961C2477EB00AADDC2 /* C4QColorPickerViewController.h */,
8D610E971C2477EB00AADDC2 /* C4QColorPickerViewController.m */,
6928B5C11C25C26100AAB8DA /* C4QColorPickerViewControllerDelegate.h */,
8D610E941C2477EB00AADDC2 /* C4QCatFactsTableViewController.h */,
8D610E951C2477EB00AADDC2 /* C4QCatFactsTableViewController.m */,
6928B5C21C25D1F000AAB8DA /* C4QCatFactTableViewCell.h */,
6928B5C31C25D1F000AAB8DA /* C4QCatFactTableViewCell.m */,
6928B5C51C25E22400AAB8DA /* C4QCatFactTableViewCell.xib */,
6928B5CB1C25F70000AAB8DA /* C4QCatFactTableViewCellDelegate.h */,
6928B5CC1C2601FC00AAB8DA /* C4QSavedCatFactsTableViewController.h */,
6928B5CD1C2601FC00AAB8DA /* C4QSavedCatFactsTableViewController.m */,
8DA03F721C2499F400328B53 /* C4QCatFactsDetailViewController.h */,
8DA03F731C2499F400328B53 /* C4QCatFactsDetailViewController.m */,
8D87530C1C24774700BBD328 /* Main.storyboard */,
Expand All @@ -114,6 +144,8 @@
8D8753031C24774700BBD328 /* Supporting Files */ = {
isa = PBXGroup;
children = (
6928B5C91C25F57000AAB8DA /* Checkmark-32.png */,
6928B5C71C25F1C900AAB8DA /* Checkmark-25.png */,
8D8753111C24774800BBD328 /* LaunchScreen.storyboard */,
8D8753141C24774800BBD328 /* Info.plist */,
8D610E981C2477EB00AADDC2 /* C4QRootViewController.h */,
Expand All @@ -134,7 +166,6 @@
8D8752FC1C24774700BBD328 /* Sources */,
8D8752FD1C24774700BBD328 /* Frameworks */,
8D8752FE1C24774700BBD328 /* Resources */,
3684AD5BAB77F4944D6E5799 /* Embed Pods Frameworks */,
91854005019C45D9F05BF3D4 /* Copy Pods Resources */,
);
buildRules = (
Expand Down Expand Up @@ -183,9 +214,12 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6928B5CA1C25F57000AAB8DA /* Checkmark-32.png in Resources */,
8D8753131C24774800BBD328 /* LaunchScreen.storyboard in Resources */,
6928B5C61C25E22400AAB8DA /* C4QCatFactTableViewCell.xib in Resources */,
8D8753101C24774800BBD328 /* Assets.xcassets in Resources */,
8D87530E1C24774700BBD328 /* Main.storyboard in Resources */,
6928B5C81C25F1C900AAB8DA /* Checkmark-25.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -207,21 +241,6 @@
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
3684AD5BAB77F4944D6E5799 /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
91854005019C45D9F05BF3D4 /* Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -245,10 +264,13 @@
buildActionMask = 2147483647;
files = (
8D8753081C24774700BBD328 /* AppDelegate.m in Sources */,
6928B5CE1C2601FC00AAB8DA /* C4QSavedCatFactsTableViewController.m in Sources */,
8D610EA01C2477EB00AADDC2 /* C4QCatFactsTableViewController.m in Sources */,
6928B5D11C2606CB00AAB8DA /* UIImage+animatedGIF.m in Sources */,
8D8753051C24774700BBD328 /* main.m in Sources */,
8DA03F741C2499F400328B53 /* C4QCatFactsDetailViewController.m in Sources */,
8D610EA41C2477EB00AADDC2 /* C4QViewController.m in Sources */,
6928B5C41C25D1F000AAB8DA /* C4QCatFactTableViewCell.m in Sources */,
8D610EA11C2477EB00AADDC2 /* C4QColorPickerViewController.m in Sources */,
8D610EA21C2477EB00AADDC2 /* C4QRootViewController.m in Sources */,
);
Expand Down Expand Up @@ -362,6 +384,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = "unit-3-final-app-assessment/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.mikekavouras.unit-3-final-app-assessment";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -374,6 +397,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = "unit-3-final-app-assessment/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.mikekavouras.unit-3-final-app-assessment";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "Checkmark-25.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading