Skip to content

Commit

Permalink
cleanup and more content
Browse files Browse the repository at this point in the history
  • Loading branch information
Averylamp committed Apr 23, 2016
1 parent 6038237 commit ad45c3d
Show file tree
Hide file tree
Showing 81 changed files with 623 additions and 1,852 deletions.
Binary file added .Podfile.swp
Binary file not shown.
14 changes: 0 additions & 14 deletions Avery Lamp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,6 @@
BB10DD2C1C59DF940079C480 /* Resources */,
D10BAC99769EC4AE8AE3EBA1 /* Embed Pods Frameworks */,
F020150E59D5307269793F9C /* Copy Pods Resources */,
BBEE427B1C5C90660000AABF /* ShellScript */,
);
buildRules = (
);
Expand Down Expand Up @@ -606,19 +605,6 @@
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
BBEE427B1C5C90660000AABF /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Fabric/run\" 2fdafbc6422df088bfe0d579573202dd3d2ba850 f2e4a890d3df54cc4223b537d93e2409e5d10558f167b8376eba9ab17948dab5";
};
D10BAC99769EC4AE8AE3EBA1 /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down
3 changes: 0 additions & 3 deletions Avery Lamp/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
//

import UIKit
import Fabric
import Crashlytics


@UIApplicationMain
Expand All @@ -19,7 +17,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
Fabric.with([Crashlytics.self])

return true
}
Expand Down
21 changes: 21 additions & 0 deletions Avery Lamp/Assets.xcassets/DribbleLogo.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "dribbble-color-thumb.jpg",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "hack-logo-fb.jpeg",
"filename" : "hack-logo-fb.png",
"scale" : "1x"
},
{
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "1506711_930420933700872_8430335823249439670_n (1).jpg",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
21 changes: 21 additions & 0 deletions Avery Lamp/Assets.xcassets/IsometricLogo.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "IsometricLogo.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "Massachusetts-Institute-of-Technology.jpg",
"filename" : "MIT_Building_10_and_the_Great_Dome,_Cambridge_MA.jpg",
"scale" : "1x"
},
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "Millburn-high.jpg",
"filename" : "Millburn-high (1).jpg",
"scale" : "1x"
},
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
21 changes: 21 additions & 0 deletions Avery Lamp/Assets.xcassets/USSquashLogo.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Slider_New-Logo.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "computerBackground.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions Avery Lamp/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<rect key="frame" x="0.0" y="28" width="600" height="844"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="IeD-Ow-UrD" id="Jj6-jO-xfl">
<rect key="frame" x="0.0" y="0.0" width="600" height="844"/>
<rect key="frame" x="0.0" y="0.0" width="600" height="843.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JAN-wp-GpW" userLabel="OpenView">
Expand Down Expand Up @@ -523,7 +523,7 @@
<rect key="frame" x="0.0" y="872" width="600" height="864"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="76V-q3-Yri" id="xTl-En-mTz">
<rect key="frame" x="0.0" y="0.0" width="600" height="864"/>
<rect key="frame" x="0.0" y="0.0" width="600" height="863.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rXx-sv-B0v" userLabel="OpenView">
Expand Down Expand Up @@ -1028,10 +1028,10 @@
<rect key="frame" x="0.0" y="461" width="414" height="272"/>
<color key="backgroundColor" red="0.32941176470588235" green="0.3529411764705882" blue="0.41568627450980389" alpha="1" colorSpace="calibratedRGB"/>
</scrollView>
<pageControl opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="tgD-F3-Hmg">
<rect key="frame" x="158" y="696" width="100" height="40"/>
<pageControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="tgD-F3-Hmg">
<rect key="frame" x="157" y="711" width="100" height="25"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="JLT-ek-y8v"/>
<constraint firstAttribute="height" constant="25" id="JLT-ek-y8v"/>
<constraint firstAttribute="width" constant="100" id="K9r-Qd-CZT"/>
</constraints>
</pageControl>
Expand Down Expand Up @@ -1270,7 +1270,7 @@
</scene>
</scenes>
<resources>
<image name="MITPicture" width="598" height="394"/>
<image name="MITPicture" width="1080" height="671"/>
<image name="SmithAppIcon" width="200" height="200"/>
<image name="SmithDetailPicture" width="400" height="268"/>
<image name="backArrow" width="200" height="200"/>
Expand Down
65 changes: 34 additions & 31 deletions Avery Lamp/ExpandedInfoViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import UIKit

class ExpandedInfoViewController: UIViewController, UIScrollViewDelegate {

@IBOutlet weak var imageView: UIImageView!
@IBOutlet weak var buttonLabel: UIButton!
@IBOutlet weak var scrollView: UIScrollView!
Expand All @@ -18,7 +18,7 @@ class ExpandedInfoViewController: UIViewController, UIScrollViewDelegate {
var infoElement: InfoElement?
var detailTextLabel:UILabel?
var viewData:JSON?

override func viewDidLoad() {
super.viewDidLoad()
self.scrollView.pagingEnabled = true
Expand All @@ -31,23 +31,23 @@ class ExpandedInfoViewController: UIViewController, UIScrollViewDelegate {

override func viewDidAppear(animated: Bool) {
detailTextLabel!.attributedText = getDetailText(section: 0)

self.buttonLabel.addTarget(self, action: #selector(ExpandedInfoViewController.labelButtonClicked), forControlEvents: .TouchUpInside)

self.buttonLabel.superview?.frame = CGRectMake(0, 0, self.view.frame.width, self.view.frame.height - scrollView.frame.height)
self.scrollView.contentSize = CGSizeMake(self.scrollView.frame.width * CGFloat(viewData!["ExtraInfoSlides"].count), self.scrollView.frame.height)
pageControl.numberOfPages = viewData!["ExtraInfoSlides"].count

// print("view data \(viewData)")
// print("view data \(viewData)")
backButton.alpha = 0.0
view.bringSubviewToFront(backButton)
UIView.animateWithDuration(1.0) {
self.backButton.alpha = 1.0
}
var lastPage:UIView?
animationFired = Array(count: viewData!["ExtraInfoSlides"].count, repeatedValue: false)

for index in 0..<viewData!["ExtraInfoSlides"].count {
for index in 0..<viewData!["ExtraInfoSlides"].count {
let page = UIView()
page.translatesAutoresizingMaskIntoConstraints = false
self.scrollView.addSubview(page)
Expand All @@ -67,19 +67,22 @@ class ExpandedInfoViewController: UIViewController, UIScrollViewDelegate {
textLabel.translatesAutoresizingMaskIntoConstraints = false
textLabel.numberOfLines = 0
textLabel.lineBreakMode = .ByWordWrapping
textLabel.adjustsFontSizeToFitWidth = true
textLabel.minimumScaleFactor = 0.7
textLabel.textColor = UIColor.whiteColor()
textLabel.font = UIFont(name: "Lato-Regular", size: 20)
textLabel.text = viewData!["ExtraInfoSlides"][index]["DetailText"].string
let font = UIFont(name: "Lato-Regular", size: 20)
textLabel.font = font
page.addSubview(textLabel)
page.addConstraint(NSLayoutConstraint(item: textLabel, attribute: .Width, relatedBy: .Equal, toItem: page, attribute: .Width, multiplier: 0.9, constant: 0.0))
page.addConstraint(NSLayoutConstraint(item: textLabel, attribute: .Height, relatedBy: .Equal, toItem: page, attribute: .Height, multiplier: 0.9, constant: 0.0))
page.addConstraint(NSLayoutConstraint(item: textLabel, attribute: .CenterX, relatedBy: .Equal, toItem: page, attribute: .CenterX, multiplier: 1.0, constant: 0.0))
page.addConstraint(NSLayoutConstraint(item: textLabel, attribute: .CenterY, relatedBy: .Equal, toItem: page, attribute: .CenterY, multiplier: 1.0, constant: 0.0))
page.addConstraint(NSLayoutConstraint(item: textLabel, attribute: .CenterY, relatedBy: .Equal, toItem: page, attribute: .CenterY, multiplier: 0.95, constant: 0.0))
textLabel.layer.opacity = 0.0
page.layoutIfNeeded()
if index == 0 {
textLabel.strokeTextLetterByLetter(width: 0.6, delay: 0.0, duration: textAnimationDuration, characterStrokeDuration: textAnimationDuration / 3, fade: true, returnStuff: false)
// textLabel.strokeTextSimultaneously(width: 0.6, delay: 0.0, duration: textAnimationDuration, fade: true)
// textLabel.strokeTextSimultaneously(width: 0.6, delay: 0.0, duration: textAnimationDuration, fade: true)
animationFired[0] = true
}

Expand All @@ -88,10 +91,10 @@ class ExpandedInfoViewController: UIViewController, UIScrollViewDelegate {



// delay(2.0) {
// print("DISMISSING VC")
//// self.dismissViewControllerAnimated(true, completion: nil)
// }
// delay(2.0) {
// print("DISMISSING VC")
//// self.dismissViewControllerAnimated(true, completion: nil)
// }
}

var textAnimationDuration = 1.5
Expand Down Expand Up @@ -136,20 +139,20 @@ class ExpandedInfoViewController: UIViewController, UIScrollViewDelegate {
self.detailTextLabel!.alpha = 1.0
}, completion: nil)
})

}

pageControl.currentPage = page
}

if animationFired[page] == false && labelForSection[page].layer.opacity == 0.0 {
labelForSection[page].strokeTextLetterByLetter(width: 0.6, delay: 0.0, duration: textAnimationDuration, characterStrokeDuration: textAnimationDuration / 3, fade: true, fadeDuration: 0.4, returnStuff: false)
// labelForSection[page].strokeTextSimultaneously(width: 0.6, delay: 0.0, duration: textAnimationDuration, fade: true)
// labelForSection[page].strokeTextSimultaneously(width: 0.6, delay: 0.0, duration: textAnimationDuration, fade: true)
animationFired[page] = true
}

}

@IBAction func backButtonClicked(sender: AnyObject) {
if viewData!["ExtraInfoSlides"][0]["DetailImage"].string != viewData!["ExtraInfoSlides"][pageControl.currentPage]["DetailImage"].string{
let imageFadeDuration = 0.3
Expand All @@ -161,16 +164,16 @@ class ExpandedInfoViewController: UIViewController, UIScrollViewDelegate {
self.imageView.alpha = 1.0
}, completion: nil)
})

}

self.dismissViewControllerAnimated(true, completion: nil)
}

func labelButtonClicked(){
self.buttonLabel.removeTarget(self, action: #selector(ExpandedInfoViewController.labelButtonClicked), forControlEvents: .TouchUpInside)
self.backButtonClicked(NSObject())
// self.dismissViewControllerAnimated(true, completion: nil)
// self.dismissViewControllerAnimated(true, completion: nil)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
Expand All @@ -191,17 +194,17 @@ class ExpandedInfoViewController: UIViewController, UIScrollViewDelegate {
}







/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/

// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/
}
Loading

0 comments on commit ad45c3d

Please sign in to comment.