Skip to content

Done #20

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

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

Done #20

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
94 changes: 94 additions & 0 deletions HeadsUpper/HeadsUpper.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
objects = {

/* Begin PBXBuildFile section */
0BB1561E1C7A10B7001FF657 /* PlayViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BB1561D1C7A10B7001FF657 /* PlayViewController.m */; };
0BB156241C7A1B3D001FF657 /* APIManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BB156231C7A1B3D001FF657 /* APIManager.m */; };
0BB1562A1C7A7649001FF657 /* headsup.png in Resources */ = {isa = PBXBuildFile; fileRef = 0BB156291C7A7649001FF657 /* headsup.png */; };
11CA86E0CE2795881D48205C /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 605DB850C3A22BAD7B6B8AD2 /* libPods.a */; };
8D89695C1C755D0200D32E8A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D89695B1C755D0200D32E8A /* main.m */; };
8D89695F1C755D0200D32E8A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D89695E1C755D0200D32E8A /* AppDelegate.m */; };
8D8969621C755D0200D32E8A /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D8969611C755D0200D32E8A /* ViewController.m */; };
Expand All @@ -16,6 +20,14 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
0BB1561C1C7A10B7001FF657 /* PlayViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlayViewController.h; sourceTree = "<group>"; };
0BB1561D1C7A10B7001FF657 /* PlayViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlayViewController.m; sourceTree = "<group>"; };
0BB156221C7A1B3D001FF657 /* APIManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIManager.h; sourceTree = "<group>"; };
0BB156231C7A1B3D001FF657 /* APIManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APIManager.m; sourceTree = "<group>"; };
0BB156291C7A7649001FF657 /* headsup.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = headsup.png; sourceTree = "<group>"; };
4434FF32294C4B17F432FAA5 /* 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>"; };
48BD71D9FDB70FCFA0165176 /* 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>"; };
605DB850C3A22BAD7B6B8AD2 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
8D8969571C755D0200D32E8A /* HeadsUpper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HeadsUpper.app; sourceTree = BUILT_PRODUCTS_DIR; };
8D89695B1C755D0200D32E8A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
8D89695D1C755D0200D32E8A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
Expand All @@ -33,17 +45,28 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
11CA86E0CE2795881D48205C /* libPods.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
36031789077037839848E460 /* Frameworks */ = {
isa = PBXGroup;
children = (
605DB850C3A22BAD7B6B8AD2 /* libPods.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
8D89694E1C755D0200D32E8A = {
isa = PBXGroup;
children = (
8D8969591C755D0200D32E8A /* HeadsUpper */,
8D8969581C755D0200D32E8A /* Products */,
DE7D7B22A26912C092AEF18D /* Pods */,
36031789077037839848E460 /* Frameworks */,
);
sourceTree = "<group>";
};
Expand All @@ -62,8 +85,13 @@
8D89695E1C755D0200D32E8A /* AppDelegate.m */,
8D8969601C755D0200D32E8A /* ViewController.h */,
8D8969611C755D0200D32E8A /* ViewController.m */,
0BB1561C1C7A10B7001FF657 /* PlayViewController.h */,
0BB1561D1C7A10B7001FF657 /* PlayViewController.m */,
0BB156221C7A1B3D001FF657 /* APIManager.h */,
0BB156231C7A1B3D001FF657 /* APIManager.m */,
8D8969631C755D0200D32E8A /* Main.storyboard */,
8D8969661C755D0200D32E8A /* Assets.xcassets */,
0BB156291C7A7649001FF657 /* headsup.png */,
8D8969681C755D0200D32E8A /* LaunchScreen.storyboard */,
8D89696B1C755D0200D32E8A /* Info.plist */,
8D89695A1C755D0200D32E8A /* Supporting Files */,
Expand All @@ -79,16 +107,28 @@
name = "Supporting Files";
sourceTree = "<group>";
};
DE7D7B22A26912C092AEF18D /* Pods */ = {
isa = PBXGroup;
children = (
48BD71D9FDB70FCFA0165176 /* Pods.debug.xcconfig */,
4434FF32294C4B17F432FAA5 /* Pods.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
8D8969561C755D0200D32E8A /* HeadsUpper */ = {
isa = PBXNativeTarget;
buildConfigurationList = 8D89696E1C755D0200D32E8A /* Build configuration list for PBXNativeTarget "HeadsUpper" */;
buildPhases = (
4C81BF9F5C53C13DA4BC093B /* Check Pods Manifest.lock */,
8D8969531C755D0200D32E8A /* Sources */,
8D8969541C755D0200D32E8A /* Frameworks */,
8D8969551C755D0200D32E8A /* Resources */,
8F9D58965036195B10B191C7 /* Embed Pods Frameworks */,
4595FFB861FCF47D2A536D34 /* Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -136,6 +176,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
0BB1562A1C7A7649001FF657 /* headsup.png in Resources */,
8D89696A1C755D0200D32E8A /* LaunchScreen.storyboard in Resources */,
8D8969671C755D0200D32E8A /* Assets.xcassets in Resources */,
8D8969651C755D0200D32E8A /* Main.storyboard in Resources */,
Expand All @@ -144,14 +185,64 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
4595FFB861FCF47D2A536D34 /* Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
showEnvVarsInLog = 0;
};
4C81BF9F5C53C13DA4BC093B /* Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
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;
};
8F9D58965036195B10B191C7 /* 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;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
8D8969531C755D0200D32E8A /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
0BB1561E1C7A10B7001FF657 /* PlayViewController.m in Sources */,
8D8969621C755D0200D32E8A /* ViewController.m in Sources */,
8D89695F1C755D0200D32E8A /* AppDelegate.m in Sources */,
8D89695C1C755D0200D32E8A /* main.m in Sources */,
0BB156241C7A1B3D001FF657 /* APIManager.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -259,6 +350,7 @@
};
8D89696F1C755D0200D32E8A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 48BD71D9FDB70FCFA0165176 /* Pods.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = HeadsUpper/Info.plist;
Expand All @@ -271,6 +363,7 @@
};
8D8969701C755D0200D32E8A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 4434FF32294C4B17F432FAA5 /* Pods.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = HeadsUpper/Info.plist;
Expand Down Expand Up @@ -300,6 +393,7 @@
8D8969701C755D0200D32E8A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
10 changes: 10 additions & 0 deletions HeadsUpper/HeadsUpper.xcworkspace/contents.xcworkspacedata

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

16 changes: 16 additions & 0 deletions HeadsUpper/HeadsUpper/APIManager.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// APIManager.h
// HeadsUpper
//
// Created by Artur Lan on 2/21/16.
// Copyright © 2016 Michael Kavouras. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface APIManager : NSObject

+ (void)findSomething:(NSString *)query
completion:(void(^)(NSArray *data))completion;

@end
37 changes: 37 additions & 0 deletions HeadsUpper/HeadsUpper/APIManager.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//
// APIManager.m
// HeadsUpper
//
// Created by Artur Lan on 2/21/16.
// Copyright © 2016 Michael Kavouras. All rights reserved.
//
#import "APIManager.h"
#import "Foundation/Foundation.h"
#import <AFNetworking/AFNetworking.h>


@implementation APIManager

+ (void)findSomething:(NSString *)query
completion:(void(^)(NSArray *data))completion
{
NSString *baseURL = @"https://heads-up-api.herokuapp.com/";


AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];

[manager GET:baseURL
parameters:nil
progress:nil
success:^(NSURLSessionTask *task, id responseObject)
{
completion(responseObject[@"title"]);
NSLog(@"%@", responseObject);
} failure:^(NSURLSessionTask *operation, NSError *error)
{
NSLog(@"Error: %@", error);
}];

}

@end
3 changes: 2 additions & 1 deletion HeadsUpper/HeadsUpper/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ @implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.

// Override point for customization after application launch.
return YES;
}

Expand Down
6 changes: 6 additions & 0 deletions HeadsUpper/HeadsUpper/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
21 changes: 18 additions & 3 deletions HeadsUpper/HeadsUpper/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8150" systemVersion="15A204g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
<!--View Controller-->
Expand All @@ -15,13 +17,26 @@
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="headsup.png" translatesAutoresizingMaskIntoConstraints="NO" id="iuF-dz-I3y">
<rect key="frame" x="20" y="20" width="560" height="580"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="xb3-aO-Qok" firstAttribute="top" secondItem="iuF-dz-I3y" secondAttribute="bottom" id="5Ui-Lc-S0a"/>
<constraint firstItem="iuF-dz-I3y" firstAttribute="top" secondItem="Llm-lL-Icb" secondAttribute="bottom" id="RIU-qR-360"/>
<constraint firstItem="iuF-dz-I3y" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leadingMargin" id="X3Z-JV-g1f"/>
<constraint firstAttribute="trailingMargin" secondItem="iuF-dz-I3y" secondAttribute="trailing" id="lvQ-Q3-p2J"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="headsup.png" width="750" height="1334"/>
</resources>
</document>
Loading