Skip to content

Commit

Permalink
Setup sample project
Browse files Browse the repository at this point in the history
This adds the 2 CocoaPods dependencies needed for the project, and sets up the basics for the demo application with the ability to reply to the fake conversation.
  • Loading branch information
davbeck committed Jun 17, 2016
1 parent 4f4154b commit 6cd0ca0
Show file tree
Hide file tree
Showing 73 changed files with 12,003 additions and 11 deletions.
102 changes: 102 additions & 0 deletions GIFFun.xcodeproj/project.pbxproj
Expand Up @@ -12,6 +12,13 @@
11A3F67B1D13ADC300B6B972 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 11A3F6791D13ADC300B6B972 /* Main.storyboard */; };
11A3F67D1D13ADC300B6B972 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 11A3F67C1D13ADC300B6B972 /* Assets.xcassets */; };
11A3F6801D13ADC300B6B972 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 11A3F67E1D13ADC300B6B972 /* LaunchScreen.storyboard */; };
11E03D3C1D13BADD0096262C /* MessageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11E03D3B1D13BADD0096262C /* MessageCell.swift */; };
11E03D3E1D13BC830096262C /* Message.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11E03D3D1D13BC830096262C /* Message.swift */; };
11E03D401D13C6BB0096262C /* image-1.gif in Resources */ = {isa = PBXBuildFile; fileRef = 11E03D3F1D13C6BB0096262C /* image-1.gif */; };
11E03D431D13C7390096262C /* image-2.gif in Resources */ = {isa = PBXBuildFile; fileRef = 11E03D411D13C7390096262C /* image-2.gif */; };
11E03D441D13C7390096262C /* image-3.gif in Resources */ = {isa = PBXBuildFile; fileRef = 11E03D421D13C7390096262C /* image-3.gif */; };
11E03D461D142F220096262C /* AspectImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11E03D451D142F220096262C /* AspectImageView.swift */; };
232BA8AE27BB57EC09200E73 /* Pods_GIFFun.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B844197FFDB5792C4C192BA /* Pods_GIFFun.framework */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -22,13 +29,23 @@
11A3F67C1D13ADC300B6B972 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
11A3F67F1D13ADC300B6B972 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
11A3F6811D13ADC300B6B972 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
11E03D3B1D13BADD0096262C /* MessageCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageCell.swift; sourceTree = "<group>"; };
11E03D3D1D13BC830096262C /* Message.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Message.swift; sourceTree = "<group>"; };
11E03D3F1D13C6BB0096262C /* image-1.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = "image-1.gif"; sourceTree = "<group>"; };
11E03D411D13C7390096262C /* image-2.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = "image-2.gif"; sourceTree = "<group>"; };
11E03D421D13C7390096262C /* image-3.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = "image-3.gif"; sourceTree = "<group>"; };
11E03D451D142F220096262C /* AspectImageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AspectImageView.swift; sourceTree = "<group>"; };
6A2762533DBEE8E3416BBFED /* Pods-GIFFun.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GIFFun.debug.xcconfig"; path = "Pods/Target Support Files/Pods-GIFFun/Pods-GIFFun.debug.xcconfig"; sourceTree = "<group>"; };
6B844197FFDB5792C4C192BA /* Pods_GIFFun.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_GIFFun.framework; sourceTree = BUILT_PRODUCTS_DIR; };
BC7C2932EA36ADC4FD823A60 /* Pods-GIFFun.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GIFFun.release.xcconfig"; path = "Pods/Target Support Files/Pods-GIFFun/Pods-GIFFun.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
11A3F66F1D13ADC200B6B972 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
232BA8AE27BB57EC09200E73 /* Pods_GIFFun.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -40,6 +57,8 @@
children = (
11A3F6741D13ADC300B6B972 /* GIFFun */,
11A3F6731D13ADC200B6B972 /* Products */,
315F267665C021C5564DD12C /* Pods */,
5A1F702AD9C2C8DE76DA26BE /* Frameworks */,
);
sourceTree = "<group>";
};
Expand All @@ -56,24 +75,50 @@
children = (
11A3F6751D13ADC300B6B972 /* AppDelegate.swift */,
11A3F6771D13ADC300B6B972 /* ViewController.swift */,
11E03D3B1D13BADD0096262C /* MessageCell.swift */,
11E03D451D142F220096262C /* AspectImageView.swift */,
11E03D3D1D13BC830096262C /* Message.swift */,
11A3F6791D13ADC300B6B972 /* Main.storyboard */,
11A3F67C1D13ADC300B6B972 /* Assets.xcassets */,
11A3F67E1D13ADC300B6B972 /* LaunchScreen.storyboard */,
11A3F6811D13ADC300B6B972 /* Info.plist */,
11E03D3F1D13C6BB0096262C /* image-1.gif */,
11E03D411D13C7390096262C /* image-2.gif */,
11E03D421D13C7390096262C /* image-3.gif */,
);
path = GIFFun;
sourceTree = "<group>";
};
315F267665C021C5564DD12C /* Pods */ = {
isa = PBXGroup;
children = (
6A2762533DBEE8E3416BBFED /* Pods-GIFFun.debug.xcconfig */,
BC7C2932EA36ADC4FD823A60 /* Pods-GIFFun.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
5A1F702AD9C2C8DE76DA26BE /* Frameworks */ = {
isa = PBXGroup;
children = (
6B844197FFDB5792C4C192BA /* Pods_GIFFun.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
11A3F6711D13ADC200B6B972 /* GIFFun */ = {
isa = PBXNativeTarget;
buildConfigurationList = 11A3F6841D13ADC300B6B972 /* Build configuration list for PBXNativeTarget "GIFFun" */;
buildPhases = (
F923BA9A34721E1947FDDD07 /* [CP] Check Pods Manifest.lock */,
11A3F66E1D13ADC200B6B972 /* Sources */,
11A3F66F1D13ADC200B6B972 /* Frameworks */,
11A3F6701D13ADC200B6B972 /* Resources */,
102A0E02F9A04627D5091E1F /* [CP] Embed Pods Frameworks */,
C018C58078B04EA141DB62AB /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -123,18 +168,72 @@
buildActionMask = 2147483647;
files = (
11A3F6801D13ADC300B6B972 /* LaunchScreen.storyboard in Resources */,
11E03D431D13C7390096262C /* image-2.gif in Resources */,
11E03D441D13C7390096262C /* image-3.gif in Resources */,
11A3F67D1D13ADC300B6B972 /* Assets.xcassets in Resources */,
11E03D401D13C6BB0096262C /* image-1.gif in Resources */,
11A3F67B1D13ADC300B6B972 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
102A0E02F9A04627D5091E1F /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GIFFun/Pods-GIFFun-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
C018C58078B04EA141DB62AB /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-GIFFun/Pods-GIFFun-resources.sh\"\n";
showEnvVarsInLog = 0;
};
F923BA9A34721E1947FDDD07 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] 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;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
11A3F66E1D13ADC200B6B972 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
11E03D3C1D13BADD0096262C /* MessageCell.swift in Sources */,
11E03D461D142F220096262C /* AspectImageView.swift in Sources */,
11E03D3E1D13BC830096262C /* Message.swift in Sources */,
11A3F6781D13ADC300B6B972 /* ViewController.swift in Sources */,
11A3F6761D13ADC300B6B972 /* AppDelegate.swift in Sources */,
);
Expand Down Expand Up @@ -249,6 +348,7 @@
};
11A3F6851D13ADC300B6B972 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 6A2762533DBEE8E3416BBFED /* Pods-GIFFun.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = GIFFun/Info.plist;
Expand All @@ -260,6 +360,7 @@
};
11A3F6861D13ADC300B6B972 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = BC7C2932EA36ADC4FD823A60 /* Pods-GIFFun.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = GIFFun/Info.plist;
Expand Down Expand Up @@ -288,6 +389,7 @@
11A3F6861D13ADC300B6B972 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
Expand Up @@ -5,6 +5,22 @@
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "11A3F6711D13ADC200B6B972"
BuildableName = "GIFFun.app"
BlueprintName = "GIFFun"
ReferencedContainer = "container:GIFFun.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
Expand All @@ -13,6 +29,15 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "11A3F6711D13ADC200B6B972"
BuildableName = "GIFFun.app"
BlueprintName = "GIFFun"
ReferencedContainer = "container:GIFFun.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
Expand All @@ -26,6 +51,16 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "11A3F6711D13ADC200B6B972"
BuildableName = "GIFFun.app"
BlueprintName = "GIFFun"
ReferencedContainer = "container:GIFFun.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
Expand All @@ -35,6 +70,16 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "11A3F6711D13ADC200B6B972"
BuildableName = "GIFFun.app"
BlueprintName = "GIFFun"
ReferencedContainer = "container:GIFFun.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
10 changes: 10 additions & 0 deletions GIFFun.xcworkspace/contents.xcworkspacedata

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

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "0"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
scope = "0"
stopOnStyle = "0">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
56 changes: 56 additions & 0 deletions GIFFun/AspectImageView.swift
@@ -0,0 +1,56 @@
//
// AspectImageView.swift
// GIFFun
//
// Created by David Beck on 6/17/16.
// Copyright © 2016 ThinkUltimate LLC. All rights reserved.
//

import UIKit


/**
An image view that maintains it's images aspect ratio using constraints.
*/
class AspectImageView: UIImageView {
private var aspectConstraint: NSLayoutConstraint? {
didSet {
oldValue?.active = false
aspectConstraint?.active = true
}
}

override var image: UIImage? {
didSet {
if let image = image {
let constraint = self.widthAnchor.constraintEqualToAnchor(self.heightAnchor, multiplier: image.size.width / image.size.height)
constraint.priority = 750

self.aspectConstraint = constraint
} else {
self.aspectConstraint = nil
}
}
}


private func commonInit() {

}

convenience init() {
self.init(frame: CGRect.zero)
}

override init(frame: CGRect) {
super.init(frame: frame)

self.commonInit()
}

required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)

self.commonInit()
}
}

0 comments on commit 6cd0ca0

Please sign in to comment.