Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
823 additions
and
632 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "1x", | ||
"filename" : "LearnTab.png" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x", | ||
"filename" : "LearnTab@2x.png" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x", | ||
"filename" : "LearnTab@3x.png" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
Thesis/Images.xcassets/PageControlBlur.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "1x", | ||
"filename" : "PageControlBlur.png" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x", | ||
"filename" : "PageControlBlur@2x.png" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x", | ||
"filename" : "PageControlBlur@3x.png" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.55 KB
Thesis/Images.xcassets/PageControlBlur.imageset/PageControlBlur@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13.2 KB
Thesis/Images.xcassets/PageControlBlur.imageset/PageControlBlur@3x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "1x", | ||
"filename" : "ReflectTab.png" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x", | ||
"filename" : "ReflectTab@2x.png" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x", | ||
"filename" : "ReflectTab@3x.png" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "1x", | ||
"filename" : "RelaxTab.png" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x", | ||
"filename" : "RelaxTab@2x.png" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x", | ||
"filename" : "RelaxTab@3x.png" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
// | ||
// OnboardingCompleteSlide.swift | ||
// Thesis | ||
// | ||
// Created by Maxwell Barvian on 3/1/15. | ||
// Copyright (c) 2015 Maxwell Barvian. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
@objc protocol OnboardingCompleteSlideDelegate { | ||
optional func onboardingCompleteSlide(onboardingCompleteslide: OnboardingCompleteSlide, didTapDoneButton doneButton: UIButton!) | ||
} | ||
|
||
class OnboardingCompleteSlide: OnboardingSlide { | ||
|
||
weak var delegate: OnboardingCompleteSlideDelegate? | ||
|
||
private(set) lazy var doneButton: UIButton = { | ||
let button = UIButton.buttonWithType(.System) as! UIButton | ||
button.setTranslatesAutoresizingMaskIntoConstraints(false) | ||
button.setTitle("Get Started!", forState: .Normal) | ||
|
||
button.addTarget(self, action: "didTapDoneButton:", forControlEvents: .TouchUpInside) | ||
|
||
return button | ||
}() | ||
|
||
override init(header: String, subheader: String) { | ||
super.init(header: header, subheader: subheader) | ||
|
||
addSubview(doneButton) | ||
} | ||
|
||
convenience init() { | ||
self.init(header: "Perfect!", subheader: "You're now well on your way to begin incorporating daily relaxation and positive reflection into your everyday life. Remember: recovering from anxiety is a process, but the benefits of these techniques can be enjoyed at every step along the way.") | ||
} | ||
|
||
required init(coder aDecoder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
// MARK: Constraints | ||
|
||
private var _didSetupConstraints = false | ||
|
||
override func updateConstraints() { | ||
super.updateConstraints() | ||
|
||
if !_didSetupConstraints { | ||
let views: [NSObject: AnyObject] = [ | ||
"doneButton": doneButton | ||
] | ||
|
||
let margin: CGFloat = 26 | ||
let metrics = [ | ||
"margin": margin | ||
] | ||
|
||
removeConstraint(subheaderBottomConstraint) | ||
subheaderBottomConstraint = NSLayoutConstraint(item: subheaderLabel, attribute: .Bottom, relatedBy: .Equal, toItem: doneButton, attribute: .Top, multiplier: 1, constant: -margin) | ||
addConstraint(subheaderBottomConstraint) | ||
addConstraint(NSLayoutConstraint(item: doneButton, attribute: .CenterX, relatedBy: .Equal, toItem: self, attribute: .CenterX, multiplier: 1, constant: 0)) | ||
addConstraint(NSLayoutConstraint(item: doneButton, attribute: .Bottom, relatedBy: .Equal, toItem: self, attribute: .Bottom, multiplier: 1, constant: 0)) | ||
|
||
_didSetupConstraints = true | ||
} | ||
} | ||
|
||
// MARK: Handlers | ||
|
||
func didTapDoneButton(button: UIButton!) { | ||
delegate?.onboardingCompleteSlide?(self, didTapDoneButton: button) | ||
} | ||
|
||
} |
Oops, something went wrong.