diff --git a/unit-2-assessment/SetCoordinatesViewController.h b/unit-2-assessment/SetCoordinatesViewController.h new file mode 100644 index 0000000..959ac25 --- /dev/null +++ b/unit-2-assessment/SetCoordinatesViewController.h @@ -0,0 +1,13 @@ +// +// SetCoordinatesViewController.h +// unit-2-assessment +// +// Created by Henna on 10/17/15. +// Copyright (c) 2015 Henna. All rights reserved. +// + +#import + +@interface SetCoordinatesViewController : UIViewController + +@end diff --git a/unit-2-assessment/SetCoordinatesViewController.m b/unit-2-assessment/SetCoordinatesViewController.m new file mode 100644 index 0000000..73e1063 --- /dev/null +++ b/unit-2-assessment/SetCoordinatesViewController.m @@ -0,0 +1,49 @@ +// +// SetCoordinatesViewController.m +// unit-2-assessment +// +// Created by Henna on 10/17/15. +// Copyright (c) 2015 Henna. All rights reserved. +// + +#import "SetCoordinatesViewController.h" + +@interface SetCoordinatesViewController () +@property (weak, nonatomic) IBOutlet UITextField *latitudeTextField; +@property (weak, nonatomic) IBOutlet UITextField *longitudeTextField; + +@end + +@implementation SetCoordinatesViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + self.longitudeTextField.text = [[NSUserDefaults standardUserDefaults] objectForKey:@"longitude"]; + self.latitudeTextField.text = [[NSUserDefaults standardUserDefaults] objectForKey:@"latitude"]; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} +- (IBAction)cancelButtonTapped:(UIBarButtonItem *)sender { + [self dismissViewControllerAnimated:YES completion:nil]; +} +- (IBAction)saveButtonTapped:(UIBarButtonItem *)sender { + [[NSUserDefaults standardUserDefaults] setObject:self.latitudeTextField.text forKey: @"latitude"]; + [[NSUserDefaults standardUserDefaults] setObject:self.longitudeTextField.text forKey: @"longitude"]; + [self dismissViewControllerAnimated:YES completion:nil]; + +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/unit-2-assessment/unit-2-assessment.xcodeproj/project.pbxproj b/unit-2-assessment/unit-2-assessment.xcodeproj/project.pbxproj index 838d4b4..309ec74 100644 --- a/unit-2-assessment/unit-2-assessment.xcodeproj/project.pbxproj +++ b/unit-2-assessment/unit-2-assessment.xcodeproj/project.pbxproj @@ -7,31 +7,67 @@ objects = { /* Begin PBXBuildFile section */ - 8D6765A61BD289BC00B30411 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D6765A51BD289BC00B30411 /* main.m */; }; - 8D6765A91BD289BC00B30411 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D6765A81BD289BC00B30411 /* AppDelegate.m */; }; - 8D6765AC1BD289BC00B30411 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D6765AB1BD289BC00B30411 /* ViewController.m */; }; - 8D6765AF1BD289BC00B30411 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8D6765AD1BD289BC00B30411 /* Main.storyboard */; }; - 8D6765B21BD289BC00B30411 /* unit_2_assessment.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 8D6765B01BD289BC00B30411 /* unit_2_assessment.xcdatamodeld */; }; - 8D6765B41BD289BC00B30411 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8D6765B31BD289BC00B30411 /* Assets.xcassets */; }; - 8D6765B71BD289BC00B30411 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8D6765B51BD289BC00B30411 /* LaunchScreen.storyboard */; }; + 38AC945C1BD2F4E300FEBA72 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 38AC945B1BD2F4E300FEBA72 /* main.m */; }; + 38AC945F1BD2F4E300FEBA72 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 38AC945E1BD2F4E300FEBA72 /* AppDelegate.m */; }; + 38AC94651BD2F4E300FEBA72 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 38AC94631BD2F4E300FEBA72 /* Main.storyboard */; }; + 38AC94671BD2F4E300FEBA72 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 38AC94661BD2F4E300FEBA72 /* Images.xcassets */; }; + 38AC946A1BD2F4E300FEBA72 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 38AC94681BD2F4E300FEBA72 /* LaunchScreen.xib */; }; + 38AC94761BD2F4E300FEBA72 /* unit_2_assessmentTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 38AC94751BD2F4E300FEBA72 /* unit_2_assessmentTests.m */; }; + 38AC94811BD2F7DA00FEBA72 /* WeatherTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 38AC94801BD2F7DA00FEBA72 /* WeatherTableViewController.m */; }; + 38AC94841BD2FC8C00FEBA72 /* SetCoordinatesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 38AC94831BD2FC8C00FEBA72 /* SetCoordinatesViewController.m */; }; + 38AC94871BD3015B00FEBA72 /* APIManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 38AC94861BD3015B00FEBA72 /* APIManager.m */; }; + 38AC948A1BD301A500FEBA72 /* weatherObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 38AC94891BD301A500FEBA72 /* weatherObject.m */; }; + 38AC948C1BD3075100FEBA72 /* CustomeTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 38AC948B1BD3075100FEBA72 /* CustomeTableViewCell.xib */; }; + 38AC948F1BD308CB00FEBA72 /* WeatherSummaryTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 38AC948E1BD308CB00FEBA72 /* WeatherSummaryTableViewCell.m */; }; + 38AC94921BD3117800FEBA72 /* WeatherDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 38AC94911BD3117800FEBA72 /* WeatherDetailViewController.m */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 38AC94701BD2F4E300FEBA72 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 38AC944E1BD2F4E300FEBA72 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 38AC94551BD2F4E300FEBA72; + remoteInfo = "unit-2-assessment"; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXFileReference section */ - 8D6765A11BD289BC00B30411 /* unit-2-assessment.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "unit-2-assessment.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 8D6765A51BD289BC00B30411 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 8D6765A71BD289BC00B30411 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 8D6765A81BD289BC00B30411 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 8D6765AA1BD289BC00B30411 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - 8D6765AB1BD289BC00B30411 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; - 8D6765AE1BD289BC00B30411 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 8D6765B11BD289BC00B30411 /* unit_2_assessment.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = unit_2_assessment.xcdatamodel; sourceTree = ""; }; - 8D6765B31BD289BC00B30411 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 8D6765B61BD289BC00B30411 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 8D6765B81BD289BC00B30411 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 38AC94561BD2F4E300FEBA72 /* unit-2-assessment.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "unit-2-assessment.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 38AC945A1BD2F4E300FEBA72 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 38AC945B1BD2F4E300FEBA72 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 38AC945D1BD2F4E300FEBA72 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 38AC945E1BD2F4E300FEBA72 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 38AC94641BD2F4E300FEBA72 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 38AC94661BD2F4E300FEBA72 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 38AC94691BD2F4E300FEBA72 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 38AC946F1BD2F4E300FEBA72 /* unit-2-assessmentTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "unit-2-assessmentTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 38AC94741BD2F4E300FEBA72 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 38AC94751BD2F4E300FEBA72 /* unit_2_assessmentTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = unit_2_assessmentTests.m; sourceTree = ""; }; + 38AC947F1BD2F7DA00FEBA72 /* WeatherTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeatherTableViewController.h; sourceTree = ""; }; + 38AC94801BD2F7DA00FEBA72 /* WeatherTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WeatherTableViewController.m; sourceTree = ""; }; + 38AC94821BD2FC8C00FEBA72 /* SetCoordinatesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SetCoordinatesViewController.h; path = ../SetCoordinatesViewController.h; sourceTree = ""; }; + 38AC94831BD2FC8C00FEBA72 /* SetCoordinatesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SetCoordinatesViewController.m; path = ../SetCoordinatesViewController.m; sourceTree = ""; }; + 38AC94851BD3015B00FEBA72 /* APIManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIManager.h; sourceTree = ""; }; + 38AC94861BD3015B00FEBA72 /* APIManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APIManager.m; sourceTree = ""; }; + 38AC94881BD301A500FEBA72 /* weatherObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = weatherObject.h; sourceTree = ""; }; + 38AC94891BD301A500FEBA72 /* weatherObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = weatherObject.m; sourceTree = ""; }; + 38AC948B1BD3075100FEBA72 /* CustomeTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CustomeTableViewCell.xib; sourceTree = ""; }; + 38AC948D1BD308CB00FEBA72 /* WeatherSummaryTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeatherSummaryTableViewCell.h; sourceTree = ""; }; + 38AC948E1BD308CB00FEBA72 /* WeatherSummaryTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WeatherSummaryTableViewCell.m; sourceTree = ""; }; + 38AC94901BD3117800FEBA72 /* WeatherDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeatherDetailViewController.h; sourceTree = ""; }; + 38AC94911BD3117800FEBA72 /* WeatherDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WeatherDetailViewController.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 8D67659E1BD289BC00B30411 /* Frameworks */ = { + 38AC94531BD2F4E300FEBA72 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 38AC946C1BD2F4E300FEBA72 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( @@ -41,43 +77,72 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 8D6765981BD289BC00B30411 = { + 38AC944D1BD2F4E300FEBA72 = { isa = PBXGroup; children = ( - 8D6765A31BD289BC00B30411 /* unit-2-assessment */, - 8D6765A21BD289BC00B30411 /* Products */, + 38AC94581BD2F4E300FEBA72 /* unit-2-assessment */, + 38AC94721BD2F4E300FEBA72 /* unit-2-assessmentTests */, + 38AC94571BD2F4E300FEBA72 /* Products */, ); sourceTree = ""; }; - 8D6765A21BD289BC00B30411 /* Products */ = { + 38AC94571BD2F4E300FEBA72 /* Products */ = { isa = PBXGroup; children = ( - 8D6765A11BD289BC00B30411 /* unit-2-assessment.app */, + 38AC94561BD2F4E300FEBA72 /* unit-2-assessment.app */, + 38AC946F1BD2F4E300FEBA72 /* unit-2-assessmentTests.xctest */, ); name = Products; sourceTree = ""; }; - 8D6765A31BD289BC00B30411 /* unit-2-assessment */ = { + 38AC94581BD2F4E300FEBA72 /* unit-2-assessment */ = { isa = PBXGroup; children = ( - 8D6765A71BD289BC00B30411 /* AppDelegate.h */, - 8D6765A81BD289BC00B30411 /* AppDelegate.m */, - 8D6765AA1BD289BC00B30411 /* ViewController.h */, - 8D6765AB1BD289BC00B30411 /* ViewController.m */, - 8D6765AD1BD289BC00B30411 /* Main.storyboard */, - 8D6765B31BD289BC00B30411 /* Assets.xcassets */, - 8D6765B51BD289BC00B30411 /* LaunchScreen.storyboard */, - 8D6765B81BD289BC00B30411 /* Info.plist */, - 8D6765B01BD289BC00B30411 /* unit_2_assessment.xcdatamodeld */, - 8D6765A41BD289BC00B30411 /* Supporting Files */, + 38AC945D1BD2F4E300FEBA72 /* AppDelegate.h */, + 38AC945E1BD2F4E300FEBA72 /* AppDelegate.m */, + 38AC94851BD3015B00FEBA72 /* APIManager.h */, + 38AC94861BD3015B00FEBA72 /* APIManager.m */, + 38AC94821BD2FC8C00FEBA72 /* SetCoordinatesViewController.h */, + 38AC94831BD2FC8C00FEBA72 /* SetCoordinatesViewController.m */, + 38AC947F1BD2F7DA00FEBA72 /* WeatherTableViewController.h */, + 38AC94801BD2F7DA00FEBA72 /* WeatherTableViewController.m */, + 38AC94901BD3117800FEBA72 /* WeatherDetailViewController.h */, + 38AC94911BD3117800FEBA72 /* WeatherDetailViewController.m */, + 38AC948B1BD3075100FEBA72 /* CustomeTableViewCell.xib */, + 38AC948D1BD308CB00FEBA72 /* WeatherSummaryTableViewCell.h */, + 38AC948E1BD308CB00FEBA72 /* WeatherSummaryTableViewCell.m */, + 38AC94881BD301A500FEBA72 /* weatherObject.h */, + 38AC94891BD301A500FEBA72 /* weatherObject.m */, + 38AC94631BD2F4E300FEBA72 /* Main.storyboard */, + 38AC94661BD2F4E300FEBA72 /* Images.xcassets */, + 38AC94681BD2F4E300FEBA72 /* LaunchScreen.xib */, + 38AC94591BD2F4E300FEBA72 /* Supporting Files */, ); path = "unit-2-assessment"; sourceTree = ""; }; - 8D6765A41BD289BC00B30411 /* Supporting Files */ = { + 38AC94591BD2F4E300FEBA72 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 38AC945A1BD2F4E300FEBA72 /* Info.plist */, + 38AC945B1BD2F4E300FEBA72 /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 38AC94721BD2F4E300FEBA72 /* unit-2-assessmentTests */ = { + isa = PBXGroup; + children = ( + 38AC94751BD2F4E300FEBA72 /* unit_2_assessmentTests.m */, + 38AC94731BD2F4E300FEBA72 /* Supporting Files */, + ); + path = "unit-2-assessmentTests"; + sourceTree = ""; + }; + 38AC94731BD2F4E300FEBA72 /* Supporting Files */ = { isa = PBXGroup; children = ( - 8D6765A51BD289BC00B30411 /* main.m */, + 38AC94741BD2F4E300FEBA72 /* Info.plist */, ); name = "Supporting Files"; sourceTree = ""; @@ -85,13 +150,13 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 8D6765A01BD289BC00B30411 /* unit-2-assessment */ = { + 38AC94551BD2F4E300FEBA72 /* unit-2-assessment */ = { isa = PBXNativeTarget; - buildConfigurationList = 8D6765BB1BD289BC00B30411 /* Build configuration list for PBXNativeTarget "unit-2-assessment" */; + buildConfigurationList = 38AC94791BD2F4E300FEBA72 /* Build configuration list for PBXNativeTarget "unit-2-assessment" */; buildPhases = ( - 8D67659D1BD289BC00B30411 /* Sources */, - 8D67659E1BD289BC00B30411 /* Frameworks */, - 8D67659F1BD289BC00B30411 /* Resources */, + 38AC94521BD2F4E300FEBA72 /* Sources */, + 38AC94531BD2F4E300FEBA72 /* Frameworks */, + 38AC94541BD2F4E300FEBA72 /* Resources */, ); buildRules = ( ); @@ -99,24 +164,46 @@ ); name = "unit-2-assessment"; productName = "unit-2-assessment"; - productReference = 8D6765A11BD289BC00B30411 /* unit-2-assessment.app */; + productReference = 38AC94561BD2F4E300FEBA72 /* unit-2-assessment.app */; productType = "com.apple.product-type.application"; }; + 38AC946E1BD2F4E300FEBA72 /* unit-2-assessmentTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 38AC947C1BD2F4E300FEBA72 /* Build configuration list for PBXNativeTarget "unit-2-assessmentTests" */; + buildPhases = ( + 38AC946B1BD2F4E300FEBA72 /* Sources */, + 38AC946C1BD2F4E300FEBA72 /* Frameworks */, + 38AC946D1BD2F4E300FEBA72 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 38AC94711BD2F4E300FEBA72 /* PBXTargetDependency */, + ); + name = "unit-2-assessmentTests"; + productName = "unit-2-assessmentTests"; + productReference = 38AC946F1BD2F4E300FEBA72 /* unit-2-assessmentTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - 8D6765991BD289BC00B30411 /* Project object */ = { + 38AC944E1BD2F4E300FEBA72 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0700; - ORGANIZATIONNAME = "Michael Kavouras"; + LastUpgradeCheck = 0640; + ORGANIZATIONNAME = Henna; TargetAttributes = { - 8D6765A01BD289BC00B30411 = { - CreatedOnToolsVersion = 7.0.1; + 38AC94551BD2F4E300FEBA72 = { + CreatedOnToolsVersion = 6.4; + }; + 38AC946E1BD2F4E300FEBA72 = { + CreatedOnToolsVersion = 6.4; + TestTargetID = 38AC94551BD2F4E300FEBA72; }; }; }; - buildConfigurationList = 8D67659C1BD289BC00B30411 /* Build configuration list for PBXProject "unit-2-assessment" */; + buildConfigurationList = 38AC94511BD2F4E300FEBA72 /* Build configuration list for PBXProject "unit-2-assessment" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; @@ -124,64 +211,93 @@ en, Base, ); - mainGroup = 8D6765981BD289BC00B30411; - productRefGroup = 8D6765A21BD289BC00B30411 /* Products */; + mainGroup = 38AC944D1BD2F4E300FEBA72; + productRefGroup = 38AC94571BD2F4E300FEBA72 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 8D6765A01BD289BC00B30411 /* unit-2-assessment */, + 38AC94551BD2F4E300FEBA72 /* unit-2-assessment */, + 38AC946E1BD2F4E300FEBA72 /* unit-2-assessmentTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 8D67659F1BD289BC00B30411 /* Resources */ = { + 38AC94541BD2F4E300FEBA72 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 38AC948C1BD3075100FEBA72 /* CustomeTableViewCell.xib in Resources */, + 38AC94651BD2F4E300FEBA72 /* Main.storyboard in Resources */, + 38AC946A1BD2F4E300FEBA72 /* LaunchScreen.xib in Resources */, + 38AC94671BD2F4E300FEBA72 /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 38AC946D1BD2F4E300FEBA72 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 8D6765B71BD289BC00B30411 /* LaunchScreen.storyboard in Resources */, - 8D6765B41BD289BC00B30411 /* Assets.xcassets in Resources */, - 8D6765AF1BD289BC00B30411 /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 8D67659D1BD289BC00B30411 /* Sources */ = { + 38AC94521BD2F4E300FEBA72 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 8D6765B21BD289BC00B30411 /* unit_2_assessment.xcdatamodeld in Sources */, - 8D6765AC1BD289BC00B30411 /* ViewController.m in Sources */, - 8D6765A91BD289BC00B30411 /* AppDelegate.m in Sources */, - 8D6765A61BD289BC00B30411 /* main.m in Sources */, + 38AC945F1BD2F4E300FEBA72 /* AppDelegate.m in Sources */, + 38AC94811BD2F7DA00FEBA72 /* WeatherTableViewController.m in Sources */, + 38AC94921BD3117800FEBA72 /* WeatherDetailViewController.m in Sources */, + 38AC948F1BD308CB00FEBA72 /* WeatherSummaryTableViewCell.m in Sources */, + 38AC945C1BD2F4E300FEBA72 /* main.m in Sources */, + 38AC948A1BD301A500FEBA72 /* weatherObject.m in Sources */, + 38AC94841BD2FC8C00FEBA72 /* SetCoordinatesViewController.m in Sources */, + 38AC94871BD3015B00FEBA72 /* APIManager.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 38AC946B1BD2F4E300FEBA72 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 38AC94761BD2F4E300FEBA72 /* unit_2_assessmentTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 38AC94711BD2F4E300FEBA72 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 38AC94551BD2F4E300FEBA72 /* unit-2-assessment */; + targetProxy = 38AC94701BD2F4E300FEBA72 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ - 8D6765AD1BD289BC00B30411 /* Main.storyboard */ = { + 38AC94631BD2F4E300FEBA72 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( - 8D6765AE1BD289BC00B30411 /* Base */, + 38AC94641BD2F4E300FEBA72 /* Base */, ); name = Main.storyboard; sourceTree = ""; }; - 8D6765B51BD289BC00B30411 /* LaunchScreen.storyboard */ = { + 38AC94681BD2F4E300FEBA72 /* LaunchScreen.xib */ = { isa = PBXVariantGroup; children = ( - 8D6765B61BD289BC00B30411 /* Base */, + 38AC94691BD2F4E300FEBA72 /* Base */, ); - name = LaunchScreen.storyboard; + name = LaunchScreen.xib; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - 8D6765B91BD289BC00B30411 /* Debug */ = { + 38AC94771BD2F4E300FEBA72 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -200,9 +316,8 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -211,20 +326,21 @@ "DEBUG=1", "$(inherited)", ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.4; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; name = Debug; }; - 8D6765BA1BD289BC00B30411 /* Release */ = { + 38AC94781BD2F4E300FEBA72 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -254,69 +370,96 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.4; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; name = Release; }; - 8D6765BC1BD289BC00B30411 /* Debug */ = { + 38AC947A1BD2F4E300FEBA72 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = "unit-2-assessment/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.mikekavouras.unit-2-assessment"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; }; - 8D6765BD1BD289BC00B30411 /* Release */ = { + 38AC947B1BD2F4E300FEBA72 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = "unit-2-assessment/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.mikekavouras.unit-2-assessment"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; }; + 38AC947D1BD2F4E300FEBA72 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = "unit-2-assessmentTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/unit-2-assessment.app/unit-2-assessment"; + }; + name = Debug; + }; + 38AC947E1BD2F4E300FEBA72 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + INFOPLIST_FILE = "unit-2-assessmentTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/unit-2-assessment.app/unit-2-assessment"; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 8D67659C1BD289BC00B30411 /* Build configuration list for PBXProject "unit-2-assessment" */ = { + 38AC94511BD2F4E300FEBA72 /* Build configuration list for PBXProject "unit-2-assessment" */ = { isa = XCConfigurationList; buildConfigurations = ( - 8D6765B91BD289BC00B30411 /* Debug */, - 8D6765BA1BD289BC00B30411 /* Release */, + 38AC94771BD2F4E300FEBA72 /* Debug */, + 38AC94781BD2F4E300FEBA72 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 8D6765BB1BD289BC00B30411 /* Build configuration list for PBXNativeTarget "unit-2-assessment" */ = { + 38AC94791BD2F4E300FEBA72 /* Build configuration list for PBXNativeTarget "unit-2-assessment" */ = { isa = XCConfigurationList; buildConfigurations = ( - 8D6765BC1BD289BC00B30411 /* Debug */, - 8D6765BD1BD289BC00B30411 /* Release */, + 38AC947A1BD2F4E300FEBA72 /* Debug */, + 38AC947B1BD2F4E300FEBA72 /* Release */, ); defaultConfigurationIsVisible = 0; }; -/* End XCConfigurationList section */ - -/* Begin XCVersionGroup section */ - 8D6765B01BD289BC00B30411 /* unit_2_assessment.xcdatamodeld */ = { - isa = XCVersionGroup; - children = ( - 8D6765B11BD289BC00B30411 /* unit_2_assessment.xcdatamodel */, + 38AC947C1BD2F4E300FEBA72 /* Build configuration list for PBXNativeTarget "unit-2-assessmentTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 38AC947D1BD2F4E300FEBA72 /* Debug */, + 38AC947E1BD2F4E300FEBA72 /* Release */, ); - currentVersion = 8D6765B11BD289BC00B30411 /* unit_2_assessment.xcdatamodel */; - path = unit_2_assessment.xcdatamodeld; - sourceTree = ""; - versionGroupType = wrapper.xcdatamodel; + defaultConfigurationIsVisible = 0; }; -/* End XCVersionGroup section */ +/* End XCConfigurationList section */ }; - rootObject = 8D6765991BD289BC00B30411 /* Project object */; + rootObject = 38AC944E1BD2F4E300FEBA72 /* Project object */; } diff --git a/unit-2-assessment/unit-2-assessment/APIManager.h b/unit-2-assessment/unit-2-assessment/APIManager.h new file mode 100644 index 0000000..2d26416 --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/APIManager.h @@ -0,0 +1,15 @@ +// +// APIManager.h +// LearnAPIs +// +// Created by Henna on 9/20/15. +// Copyright (c) 2015 Henna. All rights reserved. +// + +#import + +@interface APIManager : NSObject + ++ (void) GETRequestWithURL:(NSURL *) URL completionHandler:(void(^)(NSData *, NSURLResponse *, NSError *)) completionHandler; + +@end diff --git a/unit-2-assessment/unit-2-assessment/APIManager.m b/unit-2-assessment/unit-2-assessment/APIManager.m new file mode 100644 index 0000000..4bd0367 --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/APIManager.m @@ -0,0 +1,26 @@ +// +// APIManager.m +// LearnAPIs +// +// Created by Henna on 9/20/15. +// Copyright (c) 2015 Henna. All rights reserved. +// + +#import "APIManager.h" + +@implementation APIManager + ++ (void) GETRequestWithURL:(NSURL *) URL completionHandler:(void(^)(NSData *, NSURLResponse *, NSError *)) completionHandler { + //Create a session + NSURLSession *session = [NSURLSession sharedSession]; + NSURLSessionDataTask *dataTask = [session dataTaskWithURL:URL completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + dispatch_async(dispatch_get_main_queue(), ^{ + completionHandler(data, response, error); + }); + }]; + + [dataTask resume]; + +} + +@end diff --git a/unit-2-assessment/unit-2-assessment/AppDelegate.h b/unit-2-assessment/unit-2-assessment/AppDelegate.h index 7481e81..24978a4 100644 --- a/unit-2-assessment/unit-2-assessment/AppDelegate.h +++ b/unit-2-assessment/unit-2-assessment/AppDelegate.h @@ -2,24 +2,16 @@ // AppDelegate.h // unit-2-assessment // -// Created by Michael Kavouras on 10/17/15. -// Copyright © 2015 Michael Kavouras. All rights reserved. +// Created by Henna on 10/17/15. +// Copyright (c) 2015 Henna. All rights reserved. // #import -#import @interface AppDelegate : UIResponder @property (strong, nonatomic) UIWindow *window; -@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext; -@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel; -@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator; - -- (void)saveContext; -- (NSURL *)applicationDocumentsDirectory; - @end diff --git a/unit-2-assessment/unit-2-assessment/AppDelegate.m b/unit-2-assessment/unit-2-assessment/AppDelegate.m index ef19d05..b282929 100644 --- a/unit-2-assessment/unit-2-assessment/AppDelegate.m +++ b/unit-2-assessment/unit-2-assessment/AppDelegate.m @@ -2,8 +2,8 @@ // AppDelegate.m // unit-2-assessment // -// Created by Michael Kavouras on 10/17/15. -// Copyright © 2015 Michael Kavouras. All rights reserved. +// Created by Henna on 10/17/15. +// Copyright (c) 2015 Henna. All rights reserved. // #import "AppDelegate.h" @@ -40,88 +40,6 @@ - (void)applicationDidBecomeActive:(UIApplication *)application { - (void)applicationWillTerminate:(UIApplication *)application { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - // Saves changes in the application's managed object context before the application terminates. - [self saveContext]; -} - -#pragma mark - Core Data stack - -@synthesize managedObjectContext = _managedObjectContext; -@synthesize managedObjectModel = _managedObjectModel; -@synthesize persistentStoreCoordinator = _persistentStoreCoordinator; - -- (NSURL *)applicationDocumentsDirectory { - // The directory the application uses to store the Core Data store file. This code uses a directory named "com.mikekavouras.unit_2_assessment" in the application's documents directory. - return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; -} - -- (NSManagedObjectModel *)managedObjectModel { - // The managed object model for the application. It is a fatal error for the application not to be able to find and load its model. - if (_managedObjectModel != nil) { - return _managedObjectModel; - } - NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"unit_2_assessment" withExtension:@"momd"]; - _managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL]; - return _managedObjectModel; -} - -- (NSPersistentStoreCoordinator *)persistentStoreCoordinator { - // The persistent store coordinator for the application. This implementation creates and returns a coordinator, having added the store for the application to it. - if (_persistentStoreCoordinator != nil) { - return _persistentStoreCoordinator; - } - - // Create the coordinator and store - - _persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; - NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"unit_2_assessment.sqlite"]; - NSError *error = nil; - NSString *failureReason = @"There was an error creating or loading the application's saved data."; - if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error]) { - // Report any error we got. - NSMutableDictionary *dict = [NSMutableDictionary dictionary]; - dict[NSLocalizedDescriptionKey] = @"Failed to initialize the application's saved data"; - dict[NSLocalizedFailureReasonErrorKey] = failureReason; - dict[NSUnderlyingErrorKey] = error; - error = [NSError errorWithDomain:@"YOUR_ERROR_DOMAIN" code:9999 userInfo:dict]; - // Replace this with code to handle the error appropriately. - // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. - NSLog(@"Unresolved error %@, %@", error, [error userInfo]); - abort(); - } - - return _persistentStoreCoordinator; -} - - -- (NSManagedObjectContext *)managedObjectContext { - // Returns the managed object context for the application (which is already bound to the persistent store coordinator for the application.) - if (_managedObjectContext != nil) { - return _managedObjectContext; - } - - NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; - if (!coordinator) { - return nil; - } - _managedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSMainQueueConcurrencyType]; - [_managedObjectContext setPersistentStoreCoordinator:coordinator]; - return _managedObjectContext; -} - -#pragma mark - Core Data Saving support - -- (void)saveContext { - NSManagedObjectContext *managedObjectContext = self.managedObjectContext; - if (managedObjectContext != nil) { - NSError *error = nil; - if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) { - // Replace this implementation with code to handle the error appropriately. - // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. - NSLog(@"Unresolved error %@, %@", error, [error userInfo]); - abort(); - } - } } @end diff --git a/unit-2-assessment/unit-2-assessment/Base.lproj/LaunchScreen.storyboard b/unit-2-assessment/unit-2-assessment/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 2e721e1..0000000 --- a/unit-2-assessment/unit-2-assessment/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/unit-2-assessment/unit-2-assessment/Base.lproj/LaunchScreen.xib b/unit-2-assessment/unit-2-assessment/Base.lproj/LaunchScreen.xib new file mode 100644 index 0000000..1eb6a6f --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/Base.lproj/LaunchScreen.xib @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/unit-2-assessment/unit-2-assessment/Base.lproj/Main.storyboard b/unit-2-assessment/unit-2-assessment/Base.lproj/Main.storyboard index e627b3b..a7bc8eb 100644 --- a/unit-2-assessment/unit-2-assessment/Base.lproj/Main.storyboard +++ b/unit-2-assessment/unit-2-assessment/Base.lproj/Main.storyboard @@ -1,26 +1,246 @@ - + - + + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/unit-2-assessment/unit-2-assessment/CustomeTableViewCell.xib b/unit-2-assessment/unit-2-assessment/CustomeTableViewCell.xib new file mode 100644 index 0000000..fd20fb0 --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/CustomeTableViewCell.xib @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/unit-2-assessment/unit-2-assessment/Assets.xcassets/AppIcon.appiconset/Contents.json b/unit-2-assessment/unit-2-assessment/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from unit-2-assessment/unit-2-assessment/Assets.xcassets/AppIcon.appiconset/Contents.json rename to unit-2-assessment/unit-2-assessment/Images.xcassets/AppIcon.appiconset/Contents.json diff --git a/unit-2-assessment/unit-2-assessment/Images.xcassets/clear-day.imageset/Contents.json b/unit-2-assessment/unit-2-assessment/Images.xcassets/clear-day.imageset/Contents.json new file mode 100644 index 0000000..4cba37a --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/Images.xcassets/clear-day.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "clear-day@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/unit-2-assessment/image/clear-day@2x.png b/unit-2-assessment/unit-2-assessment/Images.xcassets/clear-day.imageset/clear-day@2x.png similarity index 100% rename from unit-2-assessment/image/clear-day@2x.png rename to unit-2-assessment/unit-2-assessment/Images.xcassets/clear-day.imageset/clear-day@2x.png diff --git a/unit-2-assessment/unit-2-assessment/Images.xcassets/clear-night.imageset/Contents.json b/unit-2-assessment/unit-2-assessment/Images.xcassets/clear-night.imageset/Contents.json new file mode 100644 index 0000000..65e87cb --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/Images.xcassets/clear-night.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "clear-night@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/unit-2-assessment/image/clear-night@2x.png b/unit-2-assessment/unit-2-assessment/Images.xcassets/clear-night.imageset/clear-night@2x.png similarity index 100% rename from unit-2-assessment/image/clear-night@2x.png rename to unit-2-assessment/unit-2-assessment/Images.xcassets/clear-night.imageset/clear-night@2x.png diff --git a/unit-2-assessment/unit-2-assessment/Images.xcassets/cloudy.imageset/Contents.json b/unit-2-assessment/unit-2-assessment/Images.xcassets/cloudy.imageset/Contents.json new file mode 100644 index 0000000..2421457 --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/Images.xcassets/cloudy.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "cloudy@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/unit-2-assessment/image/cloudy@2x.png b/unit-2-assessment/unit-2-assessment/Images.xcassets/cloudy.imageset/cloudy@2x.png similarity index 100% rename from unit-2-assessment/image/cloudy@2x.png rename to unit-2-assessment/unit-2-assessment/Images.xcassets/cloudy.imageset/cloudy@2x.png diff --git a/unit-2-assessment/unit-2-assessment/Images.xcassets/fog.imageset/Contents.json b/unit-2-assessment/unit-2-assessment/Images.xcassets/fog.imageset/Contents.json new file mode 100644 index 0000000..fe9bce5 --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/Images.xcassets/fog.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "fog@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/unit-2-assessment/image/fog@2x.png b/unit-2-assessment/unit-2-assessment/Images.xcassets/fog.imageset/fog@2x.png similarity index 100% rename from unit-2-assessment/image/fog@2x.png rename to unit-2-assessment/unit-2-assessment/Images.xcassets/fog.imageset/fog@2x.png diff --git a/unit-2-assessment/unit-2-assessment/Images.xcassets/partly-cloudy-day.imageset/Contents.json b/unit-2-assessment/unit-2-assessment/Images.xcassets/partly-cloudy-day.imageset/Contents.json new file mode 100644 index 0000000..8d51d36 --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/Images.xcassets/partly-cloudy-day.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "partly-cloudy-day@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/unit-2-assessment/image/partly-cloudy-day@2x.png b/unit-2-assessment/unit-2-assessment/Images.xcassets/partly-cloudy-day.imageset/partly-cloudy-day@2x.png similarity index 100% rename from unit-2-assessment/image/partly-cloudy-day@2x.png rename to unit-2-assessment/unit-2-assessment/Images.xcassets/partly-cloudy-day.imageset/partly-cloudy-day@2x.png diff --git a/unit-2-assessment/unit-2-assessment/Images.xcassets/partly-cloudy-night.imageset/Contents.json b/unit-2-assessment/unit-2-assessment/Images.xcassets/partly-cloudy-night.imageset/Contents.json new file mode 100644 index 0000000..1bc0ca0 --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/Images.xcassets/partly-cloudy-night.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "partly-cloudy-night@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/unit-2-assessment/image/partly-cloudy-night@2x.png b/unit-2-assessment/unit-2-assessment/Images.xcassets/partly-cloudy-night.imageset/partly-cloudy-night@2x.png similarity index 100% rename from unit-2-assessment/image/partly-cloudy-night@2x.png rename to unit-2-assessment/unit-2-assessment/Images.xcassets/partly-cloudy-night.imageset/partly-cloudy-night@2x.png diff --git a/unit-2-assessment/unit-2-assessment/Images.xcassets/rain.imageset/Contents.json b/unit-2-assessment/unit-2-assessment/Images.xcassets/rain.imageset/Contents.json new file mode 100644 index 0000000..2baa38e --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/Images.xcassets/rain.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "rain@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/unit-2-assessment/image/rain@2x.png b/unit-2-assessment/unit-2-assessment/Images.xcassets/rain.imageset/rain@2x.png similarity index 100% rename from unit-2-assessment/image/rain@2x.png rename to unit-2-assessment/unit-2-assessment/Images.xcassets/rain.imageset/rain@2x.png diff --git a/unit-2-assessment/unit-2-assessment/Images.xcassets/settings.imageset/Contents.json b/unit-2-assessment/unit-2-assessment/Images.xcassets/settings.imageset/Contents.json new file mode 100644 index 0000000..0b7af98 --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/Images.xcassets/settings.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "settings@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x", + "filename" : "settings@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/unit-2-assessment/image/settings@2x.png b/unit-2-assessment/unit-2-assessment/Images.xcassets/settings.imageset/settings@2x.png similarity index 100% rename from unit-2-assessment/image/settings@2x.png rename to unit-2-assessment/unit-2-assessment/Images.xcassets/settings.imageset/settings@2x.png diff --git a/unit-2-assessment/image/settings@3x.png b/unit-2-assessment/unit-2-assessment/Images.xcassets/settings.imageset/settings@3x.png similarity index 100% rename from unit-2-assessment/image/settings@3x.png rename to unit-2-assessment/unit-2-assessment/Images.xcassets/settings.imageset/settings@3x.png diff --git a/unit-2-assessment/unit-2-assessment/Images.xcassets/sleet.imageset/Contents.json b/unit-2-assessment/unit-2-assessment/Images.xcassets/sleet.imageset/Contents.json new file mode 100644 index 0000000..ead0b1d --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/Images.xcassets/sleet.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "sleet@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/unit-2-assessment/image/sleet@2x.png b/unit-2-assessment/unit-2-assessment/Images.xcassets/sleet.imageset/sleet@2x.png similarity index 100% rename from unit-2-assessment/image/sleet@2x.png rename to unit-2-assessment/unit-2-assessment/Images.xcassets/sleet.imageset/sleet@2x.png diff --git a/unit-2-assessment/unit-2-assessment/Images.xcassets/snow.imageset/Contents.json b/unit-2-assessment/unit-2-assessment/Images.xcassets/snow.imageset/Contents.json new file mode 100644 index 0000000..9d63b4f --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/Images.xcassets/snow.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "snow@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/unit-2-assessment/image/snow@2x.png b/unit-2-assessment/unit-2-assessment/Images.xcassets/snow.imageset/snow@2x.png similarity index 100% rename from unit-2-assessment/image/snow@2x.png rename to unit-2-assessment/unit-2-assessment/Images.xcassets/snow.imageset/snow@2x.png diff --git a/unit-2-assessment/unit-2-assessment/Images.xcassets/wind.imageset/Contents.json b/unit-2-assessment/unit-2-assessment/Images.xcassets/wind.imageset/Contents.json new file mode 100644 index 0000000..34158ca --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/Images.xcassets/wind.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "wind@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/unit-2-assessment/image/wind@2x.png b/unit-2-assessment/unit-2-assessment/Images.xcassets/wind.imageset/wind@2x.png similarity index 100% rename from unit-2-assessment/image/wind@2x.png rename to unit-2-assessment/unit-2-assessment/Images.xcassets/wind.imageset/wind@2x.png diff --git a/unit-2-assessment/unit-2-assessment/Info.plist b/unit-2-assessment/unit-2-assessment/Info.plist index 6905cc6..3a7483e 100644 --- a/unit-2-assessment/unit-2-assessment/Info.plist +++ b/unit-2-assessment/unit-2-assessment/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) + nyc.c4q.xhenna92.$(PRODUCT_NAME:rfc1034identifier) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/unit-2-assessment/unit-2-assessment/ViewController.h b/unit-2-assessment/unit-2-assessment/ViewController.h deleted file mode 100644 index e41044a..0000000 --- a/unit-2-assessment/unit-2-assessment/ViewController.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// ViewController.h -// unit-2-assessment -// -// Created by Michael Kavouras on 10/17/15. -// Copyright © 2015 Michael Kavouras. All rights reserved. -// - -#import - -@interface ViewController : UIViewController - - -@end - diff --git a/unit-2-assessment/unit-2-assessment/ViewController.m b/unit-2-assessment/unit-2-assessment/ViewController.m deleted file mode 100644 index c1f22e5..0000000 --- a/unit-2-assessment/unit-2-assessment/ViewController.m +++ /dev/null @@ -1,27 +0,0 @@ -// -// ViewController.m -// unit-2-assessment -// -// Created by Michael Kavouras on 10/17/15. -// Copyright © 2015 Michael Kavouras. All rights reserved. -// - -#import "ViewController.h" - -@interface ViewController () - -@end - -@implementation ViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -@end diff --git a/unit-2-assessment/unit-2-assessment/WeatherDetailViewController.h b/unit-2-assessment/unit-2-assessment/WeatherDetailViewController.h new file mode 100644 index 0000000..e144aae --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/WeatherDetailViewController.h @@ -0,0 +1,16 @@ +// +// WeatherDetailViewController.h +// unit-2-assessment +// +// Created by Henna on 10/17/15. +// Copyright (c) 2015 Henna. All rights reserved. +// + +#import +#import "weatherObject.h" + +@interface WeatherDetailViewController : UIViewController + +@property (nonatomic) weatherObject *weatherObj; + +@end diff --git a/unit-2-assessment/unit-2-assessment/WeatherDetailViewController.m b/unit-2-assessment/unit-2-assessment/WeatherDetailViewController.m new file mode 100644 index 0000000..6d71de7 --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/WeatherDetailViewController.m @@ -0,0 +1,49 @@ +// +// WeatherDetailViewController.m +// unit-2-assessment +// +// Created by Henna on 10/17/15. +// Copyright (c) 2015 Henna. All rights reserved. +// + +#import "WeatherDetailViewController.h" + +@interface WeatherDetailViewController () +@property (weak, nonatomic) IBOutlet UIImageView *iconImageView; +@property (weak, nonatomic) IBOutlet UILabel *summaryLabel; +@property (weak, nonatomic) IBOutlet UILabel *rainLabel; +@property (weak, nonatomic) IBOutlet UILabel *humidityLabel; +@property (weak, nonatomic) IBOutlet UILabel *windLabel; + +@end + +@implementation WeatherDetailViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.iconImageView.image = [UIImage imageNamed:self.weatherObj.icon]; + self.summaryLabel.text = self.weatherObj.summary; + self.rainLabel.text = [NSString stringWithFormat:@"%@%%", self.weatherObj.precipProbability]; + self.humidityLabel.text = [NSString stringWithFormat:@"%@%%", self.weatherObj.humidity]; + self.windLabel.text = [NSString stringWithFormat:@"%@ mph", self.weatherObj.windSpeed]; + + +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/unit-2-assessment/unit-2-assessment/WeatherSummaryTableViewCell.h b/unit-2-assessment/unit-2-assessment/WeatherSummaryTableViewCell.h new file mode 100644 index 0000000..6f1876b --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/WeatherSummaryTableViewCell.h @@ -0,0 +1,20 @@ +// +// WeatherSummaryTableViewCell.h +// unit-2-assessment +// +// Created by Henna on 10/17/15. +// Copyright (c) 2015 Henna. All rights reserved. +// + +#import + + +@interface WeatherSummaryTableViewCell : UITableViewCell +@property (weak, nonatomic) IBOutlet UILabel *weekDayLabel; +@property (weak, nonatomic) IBOutlet UIImageView *iconImage; +@property (weak, nonatomic) IBOutlet UILabel *minMaxLabel; + + + + +@end diff --git a/unit-2-assessment/unit-2-assessment/WeatherSummaryTableViewCell.m b/unit-2-assessment/unit-2-assessment/WeatherSummaryTableViewCell.m new file mode 100644 index 0000000..c030887 --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/WeatherSummaryTableViewCell.m @@ -0,0 +1,23 @@ +// +// WeatherSummaryTableViewCell.m +// unit-2-assessment +// +// Created by Henna on 10/17/15. +// Copyright (c) 2015 Henna. All rights reserved. +// + +#import "WeatherSummaryTableViewCell.h" + +@implementation WeatherSummaryTableViewCell + +- (void)awakeFromNib { + // Initialization code +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/unit-2-assessment/unit-2-assessment/WeatherTableViewController.h b/unit-2-assessment/unit-2-assessment/WeatherTableViewController.h new file mode 100644 index 0000000..5808440 --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/WeatherTableViewController.h @@ -0,0 +1,13 @@ +// +// WeatherTableViewController.h +// unit-2-assessment +// +// Created by Henna on 10/17/15. +// Copyright (c) 2015 Henna. All rights reserved. +// + +#import + +@interface WeatherTableViewController : UITableViewController + +@end diff --git a/unit-2-assessment/unit-2-assessment/WeatherTableViewController.m b/unit-2-assessment/unit-2-assessment/WeatherTableViewController.m new file mode 100644 index 0000000..f9a397c --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/WeatherTableViewController.m @@ -0,0 +1,184 @@ +// +// WeatherTableViewController.m +// unit-2-assessment +// +// Created by Henna on 10/17/15. +// Copyright (c) 2015 Henna. All rights reserved. +// + +#import "WeatherTableViewController.h" +#import "APIManager.h" +#import "weatherObject.h" +#import "WeatherSummaryTableViewCell.h" +#import "WeatherDetailViewController.h" + +@interface WeatherTableViewController () +@property (nonatomic) NSString * latitude; +@property (nonatomic) NSString * longitude; +@property (nonatomic) NSMutableArray * weatherData; + + + +@end + +@implementation WeatherTableViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + + self.longitude = [[NSUserDefaults standardUserDefaults] objectForKey:@"longitude"]; + self.latitude = [[NSUserDefaults standardUserDefaults] objectForKey:@"latitude"]; + UINib *cellNib = [UINib nibWithNibName:@"CustomeTableViewCell" bundle:nil]; + [self.tableView registerNib:cellNib forCellReuseIdentifier:@"weatherSummaryIdentifier"]; + [self setUpNavigationBar]; + + [self makeFSAPIRequestWithcallbackBlock:^{ + + [self.tableView reloadData]; + }]; + + +} + +-(void) setUpNavigationBar{ + self.navigationItem.title = @"Weatherman"; + UIImage * settingsImage = [UIImage imageNamed:@"settings"]; + UIBarButtonItem *settingsButton = [[UIBarButtonItem alloc] initWithImage:settingsImage style:UIBarButtonItemStylePlain target:self action:@selector(settingsClicked)]; + self.navigationItem.rightBarButtonItem = settingsButton; +} + +-(void)settingsClicked{ + + UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; + UIViewController *ivc = [storyboard instantiateViewControllerWithIdentifier:@"WeatherInit"]; + [self.navigationController presentViewController:ivc animated:YES completion:nil]; + +} + +- (void) makeFSAPIRequestWithcallbackBlock:(void(^)())block{ + + + NSString *urlString = [NSString stringWithFormat:@"https://api.forecast.io/forecast/8040fc5b15adaaafabbe7de9c3ff5458/%@,%@", self.latitude, self.longitude]; + + NSString *encodedString = [urlString stringByAddingPercentEncodingWithAllowedCharacters: [NSCharacterSet URLQueryAllowedCharacterSet]]; + NSURL *url = [NSURL URLWithString:encodedString]; + [APIManager GETRequestWithURL:url completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { + if (data != nil) { + NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil]; + self.weatherData = [[NSMutableArray alloc]init]; + + NSArray *results = [[json objectForKey:@"daily"] objectForKey:@"data"]; + + + for (NSDictionary *result in results) { + weatherObject *obj = [[weatherObject alloc]init]; + obj.summary = [result objectForKey:@"summary"]; + obj.precipProbability = [result objectForKey:@"precipProbability"]; + obj.humidity = [result objectForKey:@"humidity"]; + obj.windSpeed = [result objectForKey:@"windSpeed"]; + obj.icon = [result objectForKey:@"icon"]; + obj.temperatureMax = [result objectForKey:@"temperatureMax"]; + obj.temperatureMin = [result objectForKey:@"temperatureMin"]; + NSNumber *time = [result objectForKey:@"time"]; + + NSDate *date = [NSDate dateWithTimeIntervalSinceReferenceDate:[time doubleValue]]; + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; + [dateFormatter setDateFormat:@"EEEE"]; + NSString *dateName = [dateFormatter stringFromDate:date]; + obj.day = dateName; + + [self.weatherData addObject:obj]; + } + block(); + } + + }]; + +} + +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + + return self.weatherData.count; + +} + + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + WeatherSummaryTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"weatherSummaryIdentifier"]; + + weatherObject *obj = [self.weatherData objectAtIndex: indexPath.row]; + + cell.weekDayLabel.text = obj.day; + cell.iconImage.image = [UIImage imageNamed: obj.icon]; + + cell.minMaxLabel.text = [NSString stringWithFormat:@"%ld - %ld", (long)[obj.temperatureMin integerValue], (long)[obj.temperatureMax integerValue]]; + + return cell; +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + + UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; + WeatherDetailViewController *ivc = [storyboard instantiateViewControllerWithIdentifier:@"WeatherDetailView"]; + ivc.weatherObj = [self.weatherData objectAtIndex:indexPath.row]; + + + [self.navigationController pushViewController:ivc animated:YES]; + +} + + +/* +// Override to support conditional editing of the table view. +- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { + // Return NO if you do not want the specified item to be editable. + return YES; +} +*/ + +/* +// Override to support editing the table view. +- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { + if (editingStyle == UITableViewCellEditingStyleDelete) { + // Delete the row from the data source + [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; + } else if (editingStyle == UITableViewCellEditingStyleInsert) { + // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view + } +} +*/ + +/* +// Override to support rearranging the table view. +- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { +} +*/ + +/* +// Override to support conditional rearranging of the table view. +- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { + // Return NO if you do not want the item to be re-orderable. + return YES; +} +*/ + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/unit-2-assessment/unit-2-assessment/main.m b/unit-2-assessment/unit-2-assessment/main.m index 59f3a21..5c7c50c 100644 --- a/unit-2-assessment/unit-2-assessment/main.m +++ b/unit-2-assessment/unit-2-assessment/main.m @@ -2,8 +2,8 @@ // main.m // unit-2-assessment // -// Created by Michael Kavouras on 10/17/15. -// Copyright © 2015 Michael Kavouras. All rights reserved. +// Created by Henna on 10/17/15. +// Copyright (c) 2015 Henna. All rights reserved. // #import diff --git a/unit-2-assessment/unit-2-assessment/unit_2_assessment.xcdatamodeld/.xccurrentversion b/unit-2-assessment/unit-2-assessment/unit_2_assessment.xcdatamodeld/.xccurrentversion deleted file mode 100644 index ff464e4..0000000 --- a/unit-2-assessment/unit-2-assessment/unit_2_assessment.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ - - - - - _XCCurrentVersionName - unit_2_assessment.xcdatamodel - - diff --git a/unit-2-assessment/unit-2-assessment/unit_2_assessment.xcdatamodeld/unit_2_assessment.xcdatamodel/contents b/unit-2-assessment/unit-2-assessment/unit_2_assessment.xcdatamodeld/unit_2_assessment.xcdatamodel/contents deleted file mode 100644 index 193f33c..0000000 --- a/unit-2-assessment/unit-2-assessment/unit_2_assessment.xcdatamodeld/unit_2_assessment.xcdatamodel/contents +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/unit-2-assessment/unit-2-assessment/weatherObject.h b/unit-2-assessment/unit-2-assessment/weatherObject.h new file mode 100644 index 0000000..62ccc6d --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/weatherObject.h @@ -0,0 +1,24 @@ +// +// weatherObject.h +// unit-2-assessment +// +// Created by Henna on 10/17/15. +// Copyright (c) 2015 Henna. All rights reserved. +// + +#import + +@interface weatherObject : NSObject + +@property (nonatomic) NSString * summary; +@property (nonatomic) NSString *precipProbability; +@property (nonatomic) NSString *humidity; +@property (nonatomic) NSString *windSpeed; +@property (nonatomic) NSString *icon; +@property (nonatomic) NSString *temperatureMin; +@property (nonatomic) NSString *temperatureMax; +@property (nonatomic) NSString *day; + + + +@end diff --git a/unit-2-assessment/unit-2-assessment/weatherObject.m b/unit-2-assessment/unit-2-assessment/weatherObject.m new file mode 100644 index 0000000..10d1192 --- /dev/null +++ b/unit-2-assessment/unit-2-assessment/weatherObject.m @@ -0,0 +1,13 @@ +// +// weatherObject.m +// unit-2-assessment +// +// Created by Henna on 10/17/15. +// Copyright (c) 2015 Henna. All rights reserved. +// + +#import "weatherObject.h" + +@implementation weatherObject + +@end diff --git a/unit-2-assessment/unit-2-assessmentTests/Info.plist b/unit-2-assessment/unit-2-assessmentTests/Info.plist new file mode 100644 index 0000000..d03d7a9 --- /dev/null +++ b/unit-2-assessment/unit-2-assessmentTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + nyc.c4q.xhenna92.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/unit-2-assessment/unit-2-assessmentTests/unit_2_assessmentTests.m b/unit-2-assessment/unit-2-assessmentTests/unit_2_assessmentTests.m new file mode 100644 index 0000000..cfbdf03 --- /dev/null +++ b/unit-2-assessment/unit-2-assessmentTests/unit_2_assessmentTests.m @@ -0,0 +1,40 @@ +// +// unit_2_assessmentTests.m +// unit-2-assessmentTests +// +// Created by Henna on 10/17/15. +// Copyright (c) 2015 Henna. All rights reserved. +// + +#import +#import + +@interface unit_2_assessmentTests : XCTestCase + +@end + +@implementation unit_2_assessmentTests + +- (void)setUp { + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void)testExample { + // This is an example of a functional test case. + XCTAssert(YES, @"Pass"); +} + +- (void)testPerformanceExample { + // This is an example of a performance test case. + [self measureBlock:^{ + // Put the code you want to measure the time of here. + }]; +} + +@end