115 Commits

Author SHA1 Message Date
Ramotion cb471b2295 Update README.md 2020-04-06 10:00:09 +03:00
igor.k 0ae093ea75 support swift package manager 2019-11-12 03:13:39 +03:00
Ramotion 7bec499be2 Update README.md 2019-10-12 21:08:34 +03:00
Alex K 74f93c36d5 bump version 2019-04-03 16:04:09 +03:00
Alex K 4deca2d95b converted to swift 5 2019-04-03 16:02:57 +03:00
Alex K e15d420969 Merge branch 'master' of github.com:Ramotion/preview-transition 2019-04-03 15:58:22 +03:00
Alex K e08f300ebe no message 2019-04-03 15:58:09 +03:00
Ramotion 643469a4b4 Update README.md 2018-12-29 16:53:45 +03:00
Ramotion 2f8f77fb5c Update README.md 2018-12-10 12:13:28 +03:00
Alex K 2f8eb0632e update deployment target 2018-09-17 10:28:45 +03:00
Alex K f494d7f185 update podspec 2018-09-17 09:49:34 +03:00
Alex K 4f8b51b5bc convert to swift 4.2 2018-09-17 09:44:19 +03:00
Ramotion 79537b624f Update README.md 2018-06-29 14:22:43 +03:00
Ramotion 3271e28008 Update README.md 2018-06-26 11:17:19 +03:00
Ramotion 01fdcfd333 Update README.md 2018-05-29 12:01:14 +03:00
Alex K c0c3d33058 update demo project 2018-05-18 17:15:50 +03:00
Ramotion 9bae1297b2 Update README.md 2018-04-27 12:17:33 +03:00
Ramotion 13d845634a Add files via upload 2018-04-27 02:16:25 -07:00
Ramotion 226b67b654 Update README.md 2018-04-23 09:32:49 +03:00
Ramotion d3f4abfee8 Update README.md 2018-03-12 11:03:27 +03:00
Alex Mikhnev 3edf6223f7 Update README.md 2018-02-21 14:52:26 +03:00
i.kolpachkov be9990001f fixed #4 (Inspectable foregroundAlpha not working) 2018-01-18 20:19:07 +03:00
i.kolpachkov 4f143e39c5 config swift version 2018-01-18 19:38:42 +03:00
i.kolpachkov 1790d05c1d add demo icon, configure travis CI 2018-01-18 19:35:20 +03:00
i.kolpachkov cfd8a8349c fixed #15 (Image Content Mode) 2018-01-16 20:37:48 +03:00
i.kolpachkov fa277edea0 bump pod version 2018-01-16 20:17:21 +03:00
i.kolpachkov a9f62a47b8 update code format 2018-01-16 20:15:58 +03:00
i.kolpachkov 37440b4029 source code cleanup, iphone X layout adaptation, common improvements
fixed #17 (Problem with top border on iPhone X)
2018-01-16 20:12:46 +03:00
Alex K 55c93633af update readme and podspec 2017-11-27 15:54:32 +03:00
Alex K abc2774b46 swift 4 2017-11-27 15:52:46 +03:00
Travis CI 67d6842583 reorganize readme 2017-07-27 15:50:03 +03:00
Alex a7d73c406d Update README.md 2017-06-27 11:55:14 +03:00
Juri Vasylenko d6245ea06f Update README.md 2017-04-05 19:56:04 +03:00
Alex Mikhnev f531d87663 Update README.md 2017-03-10 19:54:50 +03:00
Juri Vasylenko 023d83b9f0 Update README.md 2017-02-17 17:59:51 +03:00
Juri Vasylenko 21258e6142 Update README.md 2017-01-20 16:10:09 +03:00
aleksei1000000 f2c52e31d5 Update README.md 2017-01-10 17:16:41 +03:00
Alex.k 5c1681a437 skip instal to no 2016-12-03 12:50:54 +03:00
aleksei1000000 8378f3771b Update README.md 2016-10-17 09:59:57 +03:00
aleksei1000000 41ee44cd0a Update README.md 2016-10-14 14:38:22 +03:00
aleksei1000000 884ee6c285 Update README.md 2016-10-14 14:03:56 +03:00
aleksei1000000 b7562a7c54 Update README.md 2016-10-14 14:01:17 +03:00
aleksei1000000 8eaf56bfcd Update README.md 2016-10-14 14:00:00 +03:00
aleksei1000000 31e33122de Update README.md 2016-10-14 13:59:36 +03:00
Alex.k 209e2f812c update podscet and readme 2016-10-13 16:38:45 +03:00
Alex.k 9bdc0a1d78 deployment target -> 9.0 2016-10-13 16:28:50 +03:00
Alex.k fb7706b652 update readme and podspec 2016-10-11 12:47:45 +03:00
Alex.k 5db329d60e separator animation fixed 2016-10-11 12:29:52 +03:00
Alex.k ce73ee36e5 animation fixed 2016-10-11 12:09:11 +03:00
Alex.k f44540635a small fixing 2016-10-10 17:41:51 +03:00
Alex.k c2c20c9d72 bugs fixed 2016-10-10 12:18:35 +03:00
Alex.k c8bf0dc625 bugs fixed 2016-10-10 10:51:23 +03:00
Alex.k 607120fae1 swift 3 converted 2016-09-30 18:31:43 +03:00
Juri Vasylenko 53a8a9c4e4 Update README.md 2016-08-05 12:23:34 +04:00
Juri Vasylenko e739a1fc0b Update README.md 2016-07-29 16:08:38 +04:00
Juri Vasylenko 288707c0d3 Merge pull request #8 from aleksei1000000/patch-2
Update README.md
2016-07-21 15:52:00 +04:00
aleksei1000000 190c55fdda Update README.md 2016-07-21 14:50:03 +03:00
Juri Vasylenko 523a5da83a Merge pull request #7 from aleksei1000000/patch-1
Update README.md
2016-07-21 15:46:45 +04:00
aleksei1000000 5e12d7090e Update README.md 2016-07-21 12:35:43 +03:00
aleksei1000000 069af47430 Update README.md 2016-07-21 12:26:34 +03:00
Alex.k 768eae1be3 update docs 2016-06-10 10:41:20 +03:00
Alex.k f86249a2c3 update readme 2016-06-10 10:38:46 +03:00
Alex.k 7d1c1fc6ae update readme 2016-06-07 14:42:37 +03:00
Alex.k 810c7d7971 added docs 2016-06-07 14:35:36 +03:00
Alex.k e12514b881 Merge branch 'master' of https://github.com/Ramotion/preview-transition 2016-06-02 17:41:58 +03:00
Alex.k 5208f224ae fixed typo 2016-06-02 17:41:52 +03:00
Alex 703fa05a05 Update README.md 2016-06-02 16:33:00 +03:00
Alex.k 8e42530b3e Merge branch 'master' of https://github.com/Ramotion/preview-transition 2016-06-02 15:44:18 +03:00
Alex.k e3a11c0d10 update readme 2016-06-02 15:44:12 +03:00
Alex 6e8940a322 Merge pull request #2 from BasThomas/patch-2
Fix typos
2016-05-27 12:23:58 +00:00
Bas Broek 0cd4c61481 Update README.md 2016-05-22 11:40:35 +02:00
Bas Broek e22850859b Fix typos 2016-05-22 11:40:03 +02:00
RamotionRussell 295d9ad00e Update README.md 2016-05-19 15:15:48 +03:00
Alex.k ed2d75ff87 Merge branch 'master' of https://github.com/Ramotion/preview-transition 2016-05-19 15:09:59 +03:00
Alex.k a737fac395 update readme 2016-05-19 15:09:54 +03:00
Juri Vasylenko fe9e6dfcbb Update README.md 2016-05-19 16:08:27 +04:00
Alex.k 1afeb51d13 update readme 2016-05-19 14:23:44 +03:00
Alex.k 8160537c55 added header 2016-05-19 14:22:04 +03:00
Alex.k b829379158 added preview gif 2016-05-19 14:06:16 +03:00
Alex.k f27423d80a update podspec 2016-05-12 12:19:50 +03:00
Juri Vasylenko c7b4f22467 Update README.md 2016-05-11 16:47:06 +04:00
Alex.k 1754ec67a1 change texts 2016-05-04 17:07:50 +03:00
Alex.k f8faf13b2f update readme 2016-05-04 11:52:54 +03:00
Alex.k 25749ebf37 update podspec 2016-05-04 11:37:53 +03:00
Alex.k 41fc6d4d9d update readme 2016-05-04 11:18:19 +03:00
Alex.k 25f9ef7c13 improve appearance 2016-05-04 09:56:36 +03:00
Alex.k 18ab9ffd5e added blur 2016-05-03 17:42:50 +03:00
Alex.k bec5928866 added blur 2016-05-03 14:27:15 +03:00
Alex.k 0ce53fa903 added animation 2016-05-03 14:12:13 +03:00
Alex.k ba35ef80cf added design 2016-04-29 17:49:05 +03:00
Alex.k 905e012503 removed internal words 2016-04-26 16:34:26 +03:00
Alex.k 6bb4e14a71 added new animation logic 2016-04-26 16:13:53 +03:00
Alex 8a5b5448df Update README.md 2016-04-07 14:00:42 +03:00
Alex.k c4333bfbfb change podspec 2016-04-07 12:54:25 +03:00
Alex.k 4f640ab484 new separator animation 2016-04-07 12:52:20 +03:00
Alex 686a1544cf Update README.md 2016-04-06 15:08:32 +03:00
Alex.k a75464e231 update podspec 2016-04-06 15:02:16 +03:00
Alex.k b54ac81c7c Merge branch 'master' of https://github.com/Ramotion/preview-transision 2016-04-06 15:00:19 +03:00
Alex.k 6667237f72 fixed bug with separator color 2016-04-06 15:00:13 +03:00
Alex 2d45849474 Update README.md 2016-04-06 12:03:31 +03:00
Alex 371f912b7b Update README.md 2016-04-06 11:36:05 +03:00
Alex c228688d04 Update README.md 2016-04-06 10:57:13 +03:00
Alex 01d0860efd Update README.md 2016-04-06 10:56:34 +03:00
Alex cb02a06bc7 Update README.md 2016-04-06 10:49:25 +03:00
Alex 8821bc3799 Update README.md 2016-04-06 10:46:19 +03:00
Alex.k 4a96b83e0d remove comments 2016-04-06 10:28:43 +03:00
Alex.k bda8f22ad6 change travis file 2016-04-06 10:05:39 +03:00
Alex.k aa3cd85c58 Merge branch 'master' of https://github.com/Ramotion/preview-transision 2016-04-06 09:59:09 +03:00
Alex.k bf842b792e added travis yml 2016-04-06 09:59:03 +03:00
Alex 5610fabff1 Update README.md 2016-04-05 17:06:02 +03:00
Alex.k a66031c2e7 Merge branch 'master' of https://github.com/Ramotion/preview-transision 2016-04-05 17:03:16 +03:00
Alex.k c91a289773 small changes 2016-04-05 17:03:06 +03:00
Alex c5697e7016 Update README.md 2016-04-05 16:55:03 +03:00
Alex 2693ad8452 Update README.md 2016-04-05 16:50:51 +03:00
Alex f749b191ff Update README.md 2016-04-05 16:41:53 +03:00
89 changed files with 5253 additions and 887 deletions
+1
View File
@@ -0,0 +1 @@
4.2
+11
View File
@@ -0,0 +1,11 @@
osx_image: xcode9.2
language: objective-c
xcode_project: PreviewTransitionDemo/PreviewTransitionDemo.xcodeproj
xcode_scheme: PreviewTransition
xcode_sdk: iphonesimulator11.2
# whitelist
branches:
only:
- master
+43
View File
@@ -0,0 +1,43 @@
// swift-tools-version:5.1
//
// Package.swift
//
// Copyright (c) Ramotion Inc. (https://www.ramotion.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
import PackageDescription
let package = Package(
name: "PreviewTransition",
platforms: [
.iOS(.v9)
],
products: [
.library(name: "PreviewTransition",
targets: ["PreviewTransition"]),
],
targets: [
.target(name: "PreviewTransition",
path: "PreviewTransition")
],
swiftLanguageVersions: [.v5]
)
+4 -5
View File
@@ -1,12 +1,11 @@
Pod::Spec.new do |s|
s.name = 'PreviewTransition'
s.version = '0.0.3'
s.version = '4.1.0'
s.summary = 'Transition animation'
s.license = 'MIT'
s.homepage = 'https://github.com/Ramotion/preview-transision'
s.homepage = 'https://github.com/Ramotion/preview-transition'
s.author = { 'Juri Vasylenko' => 'juri.v@ramotion.com' }
s.ios.deployment_target = '8.0'
s.source = { :git => 'https://github.com/Ramotion/preview-transision.git', :tag => s.version.to_s }
s.ios.deployment_target = '9.0'
s.source = { :git => 'https://github.com/Ramotion/preview-transition.git', :tag => s.version.to_s }
s.source_files = 'PreviewTransition/**/*.swift'
s.requires_arc = true
end
@@ -23,81 +23,98 @@
import UIKit
public class PTDetailViewController: UIViewController {
public var bgImage: UIImage?
public var titleText: String?
private var backgroundImageView: UIImageView?
/// Base UIViewController for preview transition
open class PTDetailViewController: UIViewController {
var bgImage: UIImage?
var titleText: String?
fileprivate var backgroundImageView: UIImageView?
}
// MARK: life cicle
extension PTDetailViewController {
public override func viewDidLoad() {
super.viewDidLoad()
backgroundImageView = createBackgroundImage(bgImage)
view.backgroundColor = .blackColor()
if let titleText = self.titleText {
title = titleText
extension PTDetailViewController {
open override func viewDidLoad() {
super.viewDidLoad()
backgroundImageView = createBackgroundImage(bgImage)
view.backgroundColor = .black
if let titleText = self.titleText {
title = titleText
}
// hack
if let navigationController = self.navigationController {
for case let label as UILabel in navigationController.view.subviews {
label.isHidden = true
}
}
_ = createNavBar(UIColor(red: 0, green: 0, blue: 0, alpha: 0.5))
}
// hack
if let navigationController = self.navigationController {
for case let label as UILabel in navigationController.view.subviews {
label.hidden = true
}
}
}
}
// MARK: public
extension PTDetailViewController {
public func popViewcontroller() {
if let navigationController = self.navigationController {
for case let label as UILabel in navigationController.view.subviews {
label.hidden = false
}
/**
Pops the top view controller from the navigation stack and updates the display with custom animation.
*/
public func popViewController() {
if let navigationController = self.navigationController {
for case let label as UILabel in navigationController.view.subviews {
label.isHidden = false
}
}
_ = navigationController?.popViewController(animated: false)
}
navigationController?.popViewControllerAnimated(false)
}
}
// MARK: create
extension PTDetailViewController {
private func createBackgroundImage(image: UIImage?) -> UIImageView {
// add constraint closures
let addConstraint: (imageView: UIImageView, toView: UIView, attribute: NSLayoutAttribute) -> () = {
(imageView, toView, attribute) in
let constraint = NSLayoutConstraint(item: imageView,
attribute: attribute,
relatedBy: .Equal,
toItem: toView,
attribute: attribute,
multiplier: 1,
constant: 0)
toView.addConstraint(constraint)
fileprivate func createBackgroundImage(_ image: UIImage?) -> UIImageView {
let imageView = UIImageView(frame: CGRect.zero)
imageView.image = image
imageView.frame = view.bounds
imageView.autoresizingMask = [.flexibleHeight, .flexibleWidth]
imageView.contentMode = UIView.ContentMode.scaleAspectFill
view.insertSubview(imageView, at: 0)
return imageView
}
// crate imageView
let imageView = UIImageView(frame: CGRect.zero)
imageView.image = image
imageView.translatesAutoresizingMaskIntoConstraints = false
imageView.contentMode = .Center
view.addSubview(imageView)
// added constraints
for attribute in [NSLayoutAttribute.Leading, NSLayoutAttribute.Trailing, NSLayoutAttribute.Top, NSLayoutAttribute.Bottom] {
addConstraint(imageView: imageView, toView: view, attribute: attribute)
fileprivate func createNavBar(_ color: UIColor) -> UIView {
let navBar = UIView(frame: CGRect.zero)
navBar.backgroundColor = color
navBar.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(navBar)
for attributes: NSLayoutConstraint.Attribute in [.left, .right, .top] {
(view, navBar) >>>- {
$0.attribute = attributes
return
}
}
navBar >>>- {
$0.attribute = .height
var constant: CGFloat = 64
if #available(iOS 11.0, *) {
if let topPadding = UIApplication.shared.keyWindow?.safeAreaInsets.top {
constant += topPadding
}
}
$0.constant = constant
return
}
return navBar
}
return imageView
}
}
}
@@ -23,302 +23,410 @@
import UIKit
public class ParallaxCell: UITableViewCell {
internal enum Direction {
case Up
case Down
}
internal var bgImageY: NSLayoutConstraint?
internal var bgImageHeight: NSLayoutConstraint?
internal var parallaxTitleY: NSLayoutConstraint?
@IBInspectable public var difference: CGFloat = 100 // image parallax
internal var bgImage: UIImageView?
internal var parallaxTitle: UILabel?
@IBInspectable public var foregroundColor = UIColor.blackColor()
@IBInspectable public var foregroundAlpha: CGFloat = 0.5
internal var foregroundView: UIView?
internal var isMovedHidden: Bool = false
private var closedBgImageYConstant: CGFloat = 0
private var closedYPosition: CGFloat = 0
private var damping: CGFloat = 0.78
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
commonInit()
}
override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
commonInit()
}
fileprivate struct C {
struct Constraints {
static let bottom = "Bottom"
static let height = "Height"
}
}
/// UITableViewCell with parallax background
open class ParallaxCell: UITableViewCell {
/// Custom separator view
open var separatorView: UIView?
var topSeparator: UIView? // only for animation
enum Direction {
case up
case down
}
private var bgImageY: NSLayoutConstraint?
private var bgImageHeight: NSLayoutConstraint?
private var parallaxTitleY: NSLayoutConstraint?
/// parallax offset
@IBInspectable open var difference: CGFloat = 100 // image parallax
var bgImage: UIImageView?
var parallaxTitle: UILabel?
/// The foreground views background color.
@IBInspectable open var foregroundColor: UIColor = UIColor.black {
didSet {
foregroundView?.backgroundColor = foregroundColor
}
}
/// The foreground views alpha.
@IBInspectable open var foregroundAlpha: CGFloat = 0.5 {
didSet {
foregroundView?.alpha = foregroundAlpha
}
}
var foregroundView: UIView?
var isMovedHidden: Bool = false
fileprivate var closedBgImageYConstant: CGFloat = 0
fileprivate var closedYPosition: CGFloat = 0
fileprivate var closedHeight: CGFloat = 0
fileprivate var damping: CGFloat = 0.78
/**
Initializes a view from data in a given unarchiver.
- parameter aDecoder: An unarchiver object.
- returns: An initialized UITableViewCell object.
*/
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
commonInit()
}
/**
Initializes a table cell with a style and a reuse identifier and returns it to the caller.
- parameter style: A constant indicating a cell style. See UITableViewCellStyle for descriptions of these constants.
- parameter reuseIdentifier: A string used to identify the cell object if it is to be reused for drawing multiple rows of a table view. Pass nil if the cell object is not to be reused. You should use the same reuse identifier for all cells of the same form.
- returns: an initialized UITableViewCell object or nil if the object could not be created.
*/
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
commonInit()
}
}
// MARK: life cicle
extension ParallaxCell {
internal func commonInit() {
contentView.layer.masksToBounds = true
selectionStyle = .None
// create background image view
let backgroundImageView = createBckgroundImage()
bgImageY = addConstraintsOnView(backgroundImageView)
bgImage = backgroundImageView
// create title label
let titleLabel = createTitleLable()
parallaxTitleY = addConstraintsOnView(titleLabel)
parallaxTitle = titleLabel
foregroundView = createForegroundView(foregroundColor)
contentView.backgroundColor = UIColor.blackColor()
createSeparator(.blackColor(), height: 2.0)
}
func commonInit() {
layer.masksToBounds = false
selectionStyle = .none
// create background image view
let backgroundImageView = createBckgroundImage()
// add constraints
if let bgSuperView = backgroundImageView.superview {
for attribute: NSLayoutConstraint.Attribute in [.leading, .trailing] {
(bgSuperView, backgroundImageView) >>>- {
$0.attribute = attribute
return
}
}
bgImageY = (bgSuperView, backgroundImageView) >>>- {
$0.attribute = .centerY
return
}
bgImageHeight = backgroundImageView >>>- {
$0.attribute = .height
$0.constant = bounds.height + difference
return
}
}
bgImage = backgroundImageView
foregroundView = createForegroundView(foregroundColor)
contentView.backgroundColor = UIColor.black
// create title label
let titleLabel = createTitleLable()
for attribute: NSLayoutConstraint.Attribute in [.left, .right] {
(contentView, titleLabel) >>>- {
$0.attribute = attribute
return
}
}
parallaxTitleY = (contentView, titleLabel) >>>- {
$0.attribute = .centerY
return
}
titleLabel >>>- {
$0.attribute = .height
$0.constant = bounds.height + difference
return
}
parallaxTitle = titleLabel
separatorView = createSeparator(.black, height: 2.0, verticalAttribure: .bottom, verticalConstant: 0.0)
}
open override func prepareForReuse() {
if topSeparator?.superview != nil {
topSeparator?.removeFromSuperview()
topSeparator = nil
}
}
}
// MARK: public
// MARK: Methods
public extension ParallaxCell {
public func setImage(image: UIImage, title: String) {
bgImage?.image = image
parallaxTitle?.text = title
}
/**
Sets the contents of the background image and title label
- parameter image: The image object which set to the backgroundImageView
- parameter title: The text to be displayed in the Cell
*/
func setImage(_ image: UIImage, title: String) {
bgImage?.image = image
parallaxTitle?.text = title
}
}
// MARK: internal
internal extension ParallaxCell {
internal func parallaxOffset(tableView: UITableView) {
guard let bgImageY = self.bgImageY where isMovedHidden == false else {
return
}
var deltaY = (frame.origin.y + frame.height/2) - tableView.contentOffset.y
deltaY = min(tableView.bounds.height, max(deltaY, 0)) // range
var move : CGFloat = (deltaY / tableView.bounds.height) * difference
move = move / 2.0 - move
extension ParallaxCell {
bgImageY.constant = move
}
internal func openCell(tableView: UITableView, duration: Double) {
guard let superview = self.superview,
let bgImageY = self.bgImageY else {
return
}
closedBgImageYConstant = bgImageY.constant
closedYPosition = center.y
let offsetY = tableView.contentOffset.y
let cellY = frame.origin.y - offsetY + frame.size.height / 2.0 + offsetY - tableView.frame.size.height / 2.0
let cellFrame = CGRect(x: 0, y: cellY, width: tableView.frame.size.width, height: tableView.frame.size.height)
frame = cellFrame
superview.sendSubviewToBack(self)
// animation
moveToCenter(duration , offset: offsetY)
parallaxTitle?.hidden = true
foregroundHidden(true, duration: duration / 2.0)
}
internal func closeCell(duration: Double, tableView: UITableView, completion: () -> Void) {
bgImageY?.constant = closedBgImageYConstant
UIView.animateWithDuration(duration, delay: 0, usingSpringWithDamping: damping, initialSpringVelocity: 0, options: .CurveEaseInOut, animations: { () -> Void in
self.layoutIfNeeded()
self.center = CGPoint(x: self.center.x, y: self.closedYPosition)
}, completion: {finished in
self.parallaxTitle?.hidden = false
completion()
})
foregroundHidden(false, duration: duration / 2.0)
}
func parallaxOffset(_ tableView: UITableView) {
internal func animationMoveCell(direction: Direction, duration: Double, tableView: UITableView, selectedIndexPaht: NSIndexPath, close: Bool) {
let selfYPosition = close == false ? frame.origin.y : closedYPosition
let selectedCellFrame = tableView.rectForRowAtIndexPath(selectedIndexPaht)
var dy: CGFloat = 0
if selfYPosition < selectedCellFrame.origin.y {
dy = selectedCellFrame.origin.y - tableView.contentOffset.y
} else {
dy = tableView.frame.size.height - (selectedCellFrame.origin.y - tableView.contentOffset.y + selectedCellFrame.size.height)
guard let bgImageY = self.bgImageY, isMovedHidden == false else {
return
}
var deltaY = (frame.origin.y + frame.height / 2) - tableView.contentOffset.y
deltaY = min(tableView.bounds.height, max(deltaY, 0)) // range
var move: CGFloat = (deltaY / tableView.bounds.height) * difference
move = move / 2.0 - move
bgImageY.constant = move
}
dy = direction == .Down ? dy * -1 : dy
if close == false {
closedYPosition = center.y
} else {
center.y = closedYPosition - dy
func openCell(_ tableView: UITableView, duration: Double) {
guard let superview = self.superview,
let bgImageY = self.bgImageY,
let bgImageHeight = self.bgImageHeight else {
return
}
closedBgImageYConstant = bgImageY.constant
closedYPosition = center.y
closedHeight = bgImageHeight.constant
let offsetY = tableView.contentOffset.y
let cellY = frame.origin.y - offsetY + frame.size.height / 2.0 + offsetY - tableView.frame.size.height / 2.0
let cellFrame = CGRect(x: 0, y: cellY, width: tableView.frame.size.width, height: tableView.frame.size.height)
frame = cellFrame
superview.sendSubviewToBack(self)
// animation
bgImageHeight.constant = cellFrame.height
moveToCenter(duration, offset: offsetY)
parallaxTitle?.isHidden = true
foregroundHidden(true, duration: duration)
}
func closeCell(_ duration: Double, tableView _: UITableView, completion: @escaping () -> Void) {
bgImageY?.constant = closedBgImageYConstant
bgImageHeight?.constant = closedHeight
UIView.animate(withDuration: duration, delay: 0, usingSpringWithDamping: damping, initialSpringVelocity: 0, options: UIView.AnimationOptions(), animations: { [weak self] () in
guard let `self` = self else { return }
self.bgImage?.superview?.layoutIfNeeded()
self.center = CGPoint(x: self.center.x, y: self.closedYPosition)
}, completion: { [weak self] _ in
self?.parallaxTitle?.isHidden = false
completion()
})
foregroundHidden(false, duration: duration / 2.0)
}
func animationMoveCell(_ direction: Direction, duration: Double, tableView: UITableView, selectedIndexPaht: IndexPath, close: Bool) {
let selfYPosition = close == false ? frame.origin.y : closedYPosition
let selectedCellFrame = tableView.rectForRow(at: selectedIndexPaht)
var dy: CGFloat = 0
if selfYPosition < selectedCellFrame.origin.y {
dy = selectedCellFrame.origin.y - tableView.contentOffset.y
} else {
dy = tableView.frame.size.height - (selectedCellFrame.origin.y - tableView.contentOffset.y + selectedCellFrame.size.height)
}
dy = direction == .down ? dy * -1 : dy
if close == false {
closedYPosition = center.y
} else {
center.y = closedYPosition - dy
}
superview?.bringSubviewToFront(self)
UIView.animate(withDuration: duration, delay: 0, usingSpringWithDamping: damping, initialSpringVelocity: 0, options: UIView.AnimationOptions(), animations: { () -> Void in
self.center.y = self.center.y + dy
}, completion: nil)
}
func showTopSeparator() {
topSeparator = createSeparator(.black, height: 2, verticalAttribure: .top, verticalConstant: -2)
}
superview?.bringSubviewToFront(self)
UIView.animateWithDuration(duration, delay: 0, usingSpringWithDamping: damping, initialSpringVelocity: 0, options: .CurveEaseInOut, animations: { () -> Void in
self.center.y = self.center.y + dy
}, completion: nil)
}
}
// MARK: animation
extension ParallaxCell {
private func moveToCenter(duration: Double, offset: CGFloat) {
bgImageY?.constant = 0
UIView.animateWithDuration(duration, delay: 0, usingSpringWithDamping: 0.78, initialSpringVelocity: 0, options: .CurveEaseInOut, animations: { () -> Void in
self.frame = CGRect(x: 0, y: offset, width: self.frame.size.width, height: self.frame.size.height)
self.layoutIfNeeded()
}, completion: nil)
}
private func foregroundHidden(hidden: Bool, duration: Double) {
UIView.animateWithDuration(duration) { () -> Void in
self.foregroundView?.alpha = hidden ? 0 : self.foregroundAlpha
fileprivate func moveToCenter(_ duration: Double, offset: CGFloat) {
bgImageY?.constant = 0
UIView.animate(withDuration: duration, delay: 0, usingSpringWithDamping: 0.78, initialSpringVelocity: 0, options: UIView.AnimationOptions(), animations: { () -> Void in
self.frame.origin.y = offset
self.bgImage?.superview?.layoutIfNeeded()
}, completion: nil)
}
fileprivate func foregroundHidden(_ hidden: Bool, duration: Double) {
guard let foregroundView = self.foregroundView else {
return
}
if hidden == true {
let currentConstrant = contentView.constraints.filter { return $0.identifier == C.Constraints.bottom ? true : false }
contentView.removeConstraints(currentConstrant)
foregroundView >>>- {
$0.attribute = .height
var constant: CGFloat = 64
if #available(iOS 11.0, *) {
if let topPadding = UIApplication.shared.keyWindow?.safeAreaInsets.top {
constant += topPadding
}
}
$0.constant = constant
$0.identifier = C.Constraints.height
return
}
} else {
let currentConstrant = foregroundView.constraints.filter { return $0.identifier == C.Constraints.height ? true : false }
foregroundView.removeConstraints(currentConstrant)
(contentView, foregroundView) >>>- {
$0.attribute = .bottom
$0.identifier = C.Constraints.bottom
return
}
}
UIView.animate(withDuration: duration,
delay: 0,
usingSpringWithDamping: damping * 2.0,
initialSpringVelocity: 0,
options: UIView.AnimationOptions(),
animations: { () -> Void in
foregroundView.superview?.layoutIfNeeded()
}, completion: nil)
}
}
}
// MARK: create
// MARK: create
extension ParallaxCell {
private func createBckgroundImage() -> UIImageView {
let imageView = UIImageView()
imageView.translatesAutoresizingMaskIntoConstraints = false
imageView.contentMode = .Center
contentView.addSubview(imageView)
return imageView
}
private func createTitleLable() -> UILabel {
let label = UILabel()
label.backgroundColor = .clearColor()
label.translatesAutoresizingMaskIntoConstraints = false
label.textAlignment = .Center
if case let font as UIFont = UINavigationBar.appearance().titleTextAttributes?[NSFontAttributeName] {
label.font = font
fileprivate func createBckgroundImage() -> UIImageView {
let container = UIView(frame: contentView.bounds)
container.translatesAutoresizingMaskIntoConstraints = false
container.backgroundColor = .clear
container.clipsToBounds = true
contentView.addSubview(container)
for attribute: NSLayoutConstraint.Attribute in [.left, .right, .top, .bottom] {
(contentView, container) >>>- {
$0.attribute = attribute
return
}
}
let imageView = UIImageView(frame: container.bounds)
imageView.translatesAutoresizingMaskIntoConstraints = false
imageView.contentMode = .scaleAspectFill
container.addSubview(imageView)
return imageView
}
if case let textColor as UIColor = UINavigationBar.appearance().titleTextAttributes?[NSForegroundColorAttributeName] {
label.textColor = textColor
fileprivate func createTitleLable() -> UILabel {
let label = UILabel()
label.backgroundColor = .clear
label.translatesAutoresizingMaskIntoConstraints = false
label.textAlignment = .center
if case let font as UIFont = UINavigationBar.appearance().titleTextAttributes?[NSAttributedString.Key.font] {
label.font = font
}
if case let textColor as UIColor = UINavigationBar.appearance().titleTextAttributes?[NSAttributedString.Key.foregroundColor] {
label.textColor = textColor
}
contentView.addSubview(label)
return label
}
contentView.addSubview(label)
return label
}
}
// MARK: cofigure
extension ParallaxCell {
// return center constratins
private func addConstraintsOnView(aView: UIView) -> NSLayoutConstraint? {
var centerConstraint: NSLayoutConstraint?
var constraints = [NSLayoutConstraint]()
for attribute in [NSLayoutAttribute.CenterY, NSLayoutAttribute.Leading, NSLayoutAttribute.Trailing] {
let constraint = NSLayoutConstraint(item: aView,
attribute: attribute,
relatedBy: .Equal,
toItem: aView.superview,
attribute: attribute,
multiplier: 1,
constant: 0)
constraints.append(constraint)
if attribute == .CenterY {
centerConstraint = constraint
}
fileprivate func createForegroundView(_ color: UIColor) -> UIView {
guard let bgImage = self.bgImage else {
fatalError("set bgImage")
}
let foregroundView = UIView()
foregroundView.alpha = foregroundAlpha
foregroundView.backgroundColor = color
foregroundView.translatesAutoresizingMaskIntoConstraints = false
contentView.insertSubview(foregroundView, aboveSubview: bgImage)
// add constraints
for attribute: NSLayoutConstraint.Attribute in [.left, .right, .top] {
(contentView, foregroundView) >>>- {
$0.attribute = attribute
return
}
}
(contentView, foregroundView) >>>- {
$0.attribute = .bottom
$0.identifier = C.Constraints.bottom
return
}
return foregroundView
}
aView.superview?.addConstraints(constraints)
let height = NSLayoutConstraint(item: aView,
attribute: .Height,
relatedBy: .Equal,
toItem: nil,
attribute: .Height,
multiplier: 1,
constant: bounds.height + difference)
aView.addConstraint(height)
bgImageHeight = height
return centerConstraint
}
private func createForegroundView(color: UIColor) -> UIView {
guard let bgImage = self.bgImage else {
fatalError("set bgImage")
// return bottom constraint
fileprivate func createSeparator(_ color: UIColor, height: CGFloat, verticalAttribure: NSLayoutConstraint.Attribute, verticalConstant: CGFloat) -> UIView {
let separator = UIView(frame: CGRect.zero)
separator.backgroundColor = color
separator.translatesAutoresizingMaskIntoConstraints = false
contentView.addSubview(separator)
for attribute: NSLayoutConstraint.Attribute in [.leading, .trailing] {
(contentView, separator) >>>- {
$0.attribute = attribute
return
}
}
(contentView, separator) >>>- {
$0.attribute = verticalAttribure
$0.constant = verticalConstant
return
}
// height constraint
separator >>>- {
$0.attribute = .height
$0.constant = height
return
}
return separator
}
let foregroundView = UIView()
foregroundView.alpha = foregroundAlpha
foregroundView.backgroundColor = color
foregroundView.translatesAutoresizingMaskIntoConstraints = false
contentView.insertSubview(foregroundView, aboveSubview: bgImage)
// add constraints
var constraints = [NSLayoutConstraint]()
for attribute in [NSLayoutAttribute.Left, NSLayoutAttribute.Right, NSLayoutAttribute.Top, NSLayoutAttribute.Bottom] {
let constraint = NSLayoutConstraint(item: foregroundView,
attribute: attribute,
relatedBy: .Equal,
toItem: contentView,
attribute: attribute,
multiplier: 1,
constant: 0)
constraints.append(constraint)
}
contentView.addConstraints(constraints)
return foregroundView
}
// return bottom constraint
private func createSeparator(color: UIColor, height: CGFloat) {
let separator = UIView(frame: CGRect.zero)
separator.backgroundColor = .blackColor()
separator.translatesAutoresizingMaskIntoConstraints = false
contentView.addSubview(separator)
for attribute in [NSLayoutAttribute.Bottom, NSLayoutAttribute.Leading, NSLayoutAttribute.Trailing] {
let constraint = NSLayoutConstraint(item: separator,
attribute: attribute,
relatedBy: .Equal,
toItem: contentView,
attribute: attribute,
multiplier: 1,
constant: 0)
contentView.addConstraint(constraint)
}
// height constraint
separator.addConstraint(
NSLayoutConstraint(item: separator,
attribute: .Height,
relatedBy: .Equal,
toItem: nil,
attribute: .Height,
multiplier: 1,
constant: height)
)
}
}
}
@@ -23,11 +23,7 @@
import Foundation
func delay(delay:Double, closure:()->()) {
dispatch_after(
dispatch_time(
DISPATCH_TIME_NOW,
Int64(delay * Double(NSEC_PER_SEC))
),
dispatch_get_main_queue(), closure)
func delay(_ delay: Double, closure: @escaping () -> Void) {
DispatchQueue.main.asyncAfter(
deadline: DispatchTime.now() + Double(Int64(delay * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC), execute: closure)
}
@@ -0,0 +1,77 @@
//
// ConstraintsHelper.swift
// AnimatedPageView
//
// Created by Alex K. on 13/04/16.
// Copyright © 2016 Alex K. All rights reserved.
//
import UIKit
struct ConstraintInfo {
var attribute: NSLayoutConstraint.Attribute = .left
var secondAttribute: NSLayoutConstraint.Attribute = .notAnAttribute
var constant: CGFloat = 0
var identifier: String?
var relation: NSLayoutConstraint.Relation = .equal
}
precedencegroup constOp {
associativity: left
higherThan: AssignmentPrecedence
}
infix operator >>>-: constOp
@discardableResult
func >>>- <T: UIView>(left: (T, T), block: (inout ConstraintInfo) -> Void) -> NSLayoutConstraint {
var info = ConstraintInfo()
block(&info)
info.secondAttribute = info.secondAttribute == .notAnAttribute ? info.attribute : info.secondAttribute
let constraint = NSLayoutConstraint(item: left.1,
attribute: info.attribute,
relatedBy: info.relation,
toItem: left.0,
attribute: info.secondAttribute,
multiplier: 1,
constant: info.constant)
constraint.identifier = info.identifier
left.0.addConstraint(constraint)
return constraint
}
@discardableResult
func >>>- <T: UIView>(left: T, block: (inout ConstraintInfo) -> Void) -> NSLayoutConstraint {
var info = ConstraintInfo()
block(&info)
let constraint = NSLayoutConstraint(item: left,
attribute: info.attribute,
relatedBy: info.relation,
toItem: nil,
attribute: info.attribute,
multiplier: 1,
constant: info.constant)
constraint.identifier = info.identifier
left.addConstraint(constraint)
return constraint
}
@discardableResult
func >>>- <T: UIView>(left: (T, T, T), block: (inout ConstraintInfo) -> Void) -> NSLayoutConstraint {
var info = ConstraintInfo()
block(&info)
info.secondAttribute = info.secondAttribute == .notAnAttribute ? info.attribute : info.secondAttribute
let constraint = NSLayoutConstraint(item: left.1,
attribute: info.attribute,
relatedBy: info.relation,
toItem: left.2,
attribute: info.secondAttribute,
multiplier: 1,
constant: info.constant)
constraint.identifier = info.identifier
left.0.addConstraint(constraint)
return constraint
}
@@ -24,57 +24,63 @@
import UIKit
internal enum MovingDirection {
case Up
case Down
case up
case down
}
internal protocol Moving {
var defaultYPosition: CGFloat {get set}
mutating func move(duration: Double, direction: MovingDirection, completion: ((Bool) -> Void)?)
internal protocol Moving: class {
var defaultYPosition: CGFloat { get set }
func move(_ duration: Double, direction: MovingDirection, completion: ((Bool) -> Void)?)
}
extension Moving where Self: UIView {
mutating func move(duration: Double, direction: MovingDirection, completion: ((Bool) -> Void)?) {
UIView.animateWithDuration(duration,
delay: 0,
usingSpringWithDamping: 0.78,
initialSpringVelocity: 0,
options: .CurveEaseInOut,
animations: { () -> Void in
var toYPosition = self.defaultYPosition
if direction == .Up {
self.defaultYPosition = self.frame.origin.y
toYPosition = 20
}
self.frame = CGRect(x: 0, y: toYPosition, width: self.frame.size.width, height: self.frame.size.height)
}, completion: completion)
}
func move(_ duration: Double, direction: MovingDirection, completion: ((Bool) -> Void)?) {
UIView.animate(withDuration: duration,
delay: 0,
usingSpringWithDamping: 0.78,
initialSpringVelocity: 0,
options: UIView.AnimationOptions(),
animations: { [weak self] () -> Void in
guard let `self` = self else { return }
var toYPosition = self.defaultYPosition
if direction == .up {
self.defaultYPosition = self.frame.origin.y
var position: CGFloat = 20
if #available(iOS 11.0, *) {
if let topPadding = UIApplication.shared.keyWindow?.safeAreaInsets.top {
position = topPadding
}
}
toYPosition = position
}
self.frame = CGRect(x: 0, y: toYPosition, width: self.frame.size.width, height: self.frame.size.height)
}, completion: completion)
}
}
internal class MovingLabel: UILabel, Moving {
var defaultYPosition: CGFloat = 0
var defaultYPosition: CGFloat = 0
}
internal class MovingView: UIView {
var defaultYPosition: CGFloat = 0
internal func move(duration: Double, direction: MovingDirection, distance: CGFloat, completion: ((Bool) -> Void)? = nil) {
var yPosition = defaultYPosition - 2
if direction == .Down {
defaultYPosition = frame.origin.y
yPosition = distance
}
UIView.animateWithDuration(duration,
delay: 0,
usingSpringWithDamping: 0.78,
initialSpringVelocity: 0,
options: .CurveEaseInOut,
animations: { () -> Void in
self.frame.origin.y = yPosition
}, completion: completion)
}
var defaultYPosition: CGFloat = 0
internal func move(_ duration: Double, direction: MovingDirection, distance: CGFloat, completion: ((Bool) -> Void)? = nil) {
var yPosition = defaultYPosition - 2
if direction == .down {
defaultYPosition = frame.origin.y
yPosition = distance
}
UIView.animate(withDuration: duration,
delay: 0,
usingSpringWithDamping: 0.78,
initialSpringVelocity: 0,
options: UIView.AnimationOptions(),
animations: { () -> Void in
self.frame.origin.y = yPosition
}, completion: completion)
}
}
@@ -22,206 +22,216 @@
// THE SOFTWARE.
import UIKit
fileprivate func < <T: Comparable>(lhs: T?, rhs: T?) -> Bool {
switch (lhs, rhs) {
case let (l?, r?):
return l < r
case (nil, _?):
return true
default:
return false
}
}
public class PTTableViewController: UITableViewController {
internal var currentCell: ParallaxCell?
internal var currentSeparatorView: MovingView? // separator witch move up to navigation bar
private var duration: Double = 0.65
private var currentTextLabel: MovingLabel?
/// Base UITableViewController for preview transition
open class PTTableViewController: UITableViewController {
internal var currentCell: ParallaxCell?
fileprivate var duration: Double = 0.8
fileprivate var currentTextLabel: MovingLabel?
}
// MARK: public
public extension PTTableViewController {
public func pushViewController(viewController: PTDetailViewController) {
guard let currentCell = currentCell,
let navigationController = self.navigationController else {
fatalError("current cell is empty or add navigationController")
/**
Pushes a view controller onto the receivers stack and updates the display whith custom animation.
- parameter viewController: The view controller to push onto the stack.
*/
func pushViewController(_ viewController: PTDetailViewController) {
guard let currentCell = currentCell,
let navigationController = self.navigationController else {
fatalError("current cell is empty or add navigationController")
}
if let currentIndex = tableView.indexPath(for: currentCell) {
let nextIndex = IndexPath(row: (currentIndex as NSIndexPath).row + 1, section: (currentIndex as NSIndexPath).section)
if case let nextCell as ParallaxCell = tableView.cellForRow(at: nextIndex) {
nextCell.showTopSeparator()
nextCell.superview?.bringSubviewToFront(nextCell)
}
}
currentTextLabel = createTitleLable(currentCell)
currentTextLabel?.move(duration, direction: .up, completion: nil)
currentCell.openCell(tableView, duration: duration)
moveCells(tableView, currentCell: currentCell, duration: duration)
if let bgImage = currentCell.bgImage?.image {
viewController.bgImage = bgImage
}
if let text = currentCell.parallaxTitle?.text {
viewController.titleText = text
}
delay(duration) {
navigationController.pushViewController(viewController, animated: false)
}
}
self.currentTextLabel = createTitleLable(currentCell)
currentTextLabel?.move(duration, direction: .Up, completion: nil)
currentSeparatorView = createSeparator(.blackColor(), height: 2, cell: currentCell)
currentSeparatorView?.move(duration, direction: .Down, distance: tableView.bounds.size.height)
currentCell.openCell(tableView, duration: duration)
moveCells(tableView, currentCell: currentCell, duration: duration)
if let bgImage = currentCell.bgImage?.image {
viewController.bgImage = bgImage
}
if let text = currentCell.parallaxTitle?.text {
viewController.titleText = text
}
delay(duration) {
navigationController.pushViewController(viewController, animated: false)
}
}
}
// MARK: life cicle
extension PTTableViewController {
public override func viewDidLoad() {
super.viewDidLoad()
tableView.contentInset = UIEdgeInsetsMake(-64, 0, 0, 0);
tableView.separatorStyle = .None
}
public override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
moveCellsBackIfNeed(duration) {
self.tableView.reloadData()
open override func viewDidLoad() {
super.viewDidLoad()
tableView.separatorStyle = .none
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
} else {
tableView.contentInset = UIEdgeInsets.init(top: -64, left: 0, bottom: 0, right: 0)
}
}
open override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
moveCellsBackIfNeed(duration) {
self.tableView.reloadData()
}
closeCurrentCellIfNeed(duration)
moveDownCurrentLabelIfNeed()
}
closeCurrentCellIfNeed(duration)
moveDownCurrentLabelIfNeed()
moveSeparatorIfNeed()
}
}
// MARK: create
extension PTTableViewController {
private func createTitleLable(cell: ParallaxCell) -> MovingLabel {
let yPosition = cell.frame.origin.y + cell.frame.size.height / 2.0 - 22 - tableView.contentOffset.y
let label = MovingLabel(frame: CGRect(x: 0, y: yPosition, width: UIScreen.mainScreen().bounds.size.width, height: 44))
label.textAlignment = .Center
label.backgroundColor = .clearColor()
if let font = cell.parallaxTitle?.font,
let text = cell.parallaxTitle?.text,
let textColor = cell.parallaxTitle?.textColor {
label.font = font
label.text = text
label.textColor = textColor
fileprivate func createTitleLable(_ cell: ParallaxCell) -> MovingLabel {
let yPosition = cell.frame.origin.y + cell.frame.size.height / 2.0 - 22 - tableView.contentOffset.y
let label = MovingLabel(frame: CGRect(x: 0, y: yPosition, width: UIScreen.main.bounds.size.width, height: 44))
label.textAlignment = .center
label.backgroundColor = .clear
if let font = cell.parallaxTitle?.font,
let text = cell.parallaxTitle?.text,
let textColor = cell.parallaxTitle?.textColor {
label.font = font
label.text = text
label.textColor = textColor
}
navigationController?.view.addSubview(label)
return label
}
fileprivate func createSeparator(_ color: UIColor?, height: CGFloat, cell: UITableViewCell) -> MovingView {
let yPosition = cell.frame.origin.y + cell.frame.size.height - tableView.contentOffset.y
let separator = MovingView(frame: CGRect(x: 0.0, y: yPosition, width: tableView.bounds.size.width, height: height))
if let color = color {
separator.backgroundColor = color
}
separator.translatesAutoresizingMaskIntoConstraints = false
navigationController?.view.addSubview(separator)
return separator
}
navigationController?.view.addSubview(label)
return label
}
private func createSeparator(color: UIColor, height: CGFloat, cell: UITableViewCell) -> MovingView {
let yPosition = cell.frame.origin.y + cell.frame.size.height - tableView.contentOffset.y
let separator = MovingView(frame: CGRect(x:0.0, y: yPosition, width: tableView.bounds.size.width, height: height))
separator.backgroundColor = color
separator.translatesAutoresizingMaskIntoConstraints = false
navigationController?.view.addSubview(separator)
return separator
}
}
// MARK: tableView dataSource
extension PTTableViewController {
final public override func tableView(tableView: UITableView, willSelectRowAtIndexPath indexPath: NSIndexPath) -> NSIndexPath? {
guard let currentCell = tableView.cellForRowAtIndexPath(indexPath) as? ParallaxCell else {
return indexPath
public final override func tableView(_ tableView: UITableView, willSelectRowAt indexPath: IndexPath) -> IndexPath? {
guard let currentCell = tableView.cellForRow(at: indexPath) as? ParallaxCell else {
return indexPath
}
self.currentCell = currentCell
return indexPath
}
self.currentCell = currentCell
return indexPath
}
}
// MARK: helpers
extension PTTableViewController {
private func parallaxOffsetDidChange(offset: CGFloat) {
for case let cell as ParallaxCell in tableView.visibleCells where cell != currentCell {
cell.parallaxOffset(tableView)
fileprivate func parallaxOffsetDidChange(_: CGFloat) {
_ = tableView.visibleCells
.filter { $0 != currentCell }
.forEach { if case let cell as ParallaxCell = $0 { cell.parallaxOffset(tableView) } }
}
}
private func moveCellsBackIfNeed(duration: Double, completion: () -> Void) {
guard let currentCell = self.currentCell,
let currentIndex = tableView.indexPathForCell(currentCell) else {
return
fileprivate func moveCellsBackIfNeed(_ duration: Double, completion: @escaping () -> Void) {
guard let currentCell = self.currentCell,
let currentIndex = tableView.indexPath(for: currentCell) else {
return
}
for case let cell as ParallaxCell in tableView.visibleCells where cell != currentCell {
if cell.isMovedHidden == false { continue }
if let index = tableView.indexPath(for: cell) {
let direction = (index as NSIndexPath).row < (currentIndex as NSIndexPath).row ? ParallaxCell.Direction.up : ParallaxCell.Direction.down
cell.animationMoveCell(direction, duration: duration, tableView: tableView, selectedIndexPaht: currentIndex, close: true)
cell.isMovedHidden = false
}
}
delay(duration, closure: completion)
}
for case let cell as ParallaxCell in tableView.visibleCells where cell != currentCell {
if cell.isMovedHidden == false {continue}
if let index = tableView.indexPathForCell(cell) {
let direction = index.row < currentIndex.row ? ParallaxCell.Direction .Up : ParallaxCell.Direction.Down
cell.animationMoveCell(direction, duration: duration, tableView: tableView, selectedIndexPaht: currentIndex, close: true)
cell.isMovedHidden = false
}
fileprivate func closeCurrentCellIfNeed(_ duration: Double) {
guard let currentCell = self.currentCell else {
return
}
currentCell.closeCell(duration, tableView: tableView) { () -> Void in
self.currentCell = nil
}
}
delay(duration, closure: completion)
}
private func closeCurrentCellIfNeed(duration: Double) {
guard let currentCell = self.currentCell else {
return
fileprivate func moveDownCurrentLabelIfNeed() {
guard let currentTextLabel = self.currentTextLabel else {
return
}
currentTextLabel.move(duration, direction: .down) { _ in
currentTextLabel.removeFromSuperview()
self.currentTextLabel = nil
}
}
currentCell.closeCell(duration, tableView: tableView) { () -> Void in
self.currentCell = nil
// animtaions
fileprivate func moveCells(_ tableView: UITableView, currentCell: ParallaxCell, duration: Double) {
guard let currentIndex = tableView.indexPath(for: currentCell) else {
return
}
for case let cell as ParallaxCell in tableView.visibleCells where cell != currentCell {
cell.isMovedHidden = true
let row = (tableView.indexPath(for: cell) as NSIndexPath?)?.row
let direction = row < (currentIndex as NSIndexPath).row ? ParallaxCell.Direction.down : ParallaxCell.Direction.up
cell.animationMoveCell(direction, duration: duration, tableView: tableView, selectedIndexPaht: currentIndex, close: false)
}
}
}
private func moveDownCurrentLabelIfNeed() {
guard var currentTextLabel = self.currentTextLabel else {
return
}
currentTextLabel.move(duration, direction: .Down) { (finished) in
currentTextLabel.removeFromSuperview()
self.currentTextLabel = nil
}
}
private func moveSeparatorIfNeed() {
guard let currentSeparatorView = self.currentSeparatorView else {
return
}
currentSeparatorView.move(duration + 0.01, direction: .Up, distance: 0) { (finished) in
dispatch_async(dispatch_get_main_queue(), {
currentSeparatorView.removeFromSuperview()
self.currentSeparatorView = nil
})
}
}
// animtaions
private func moveCells(tableView: UITableView, currentCell: ParallaxCell, duration: Double) {
guard let currentIndex = tableView.indexPathForCell(currentCell) else {
return
}
for case let cell as ParallaxCell in tableView.visibleCells where cell != currentCell {
cell.isMovedHidden = true
let row = tableView.indexPathForCell(cell)?.row
let direction = row < currentIndex.row ? ParallaxCell.Direction .Down : ParallaxCell.Direction.Up
cell.animationMoveCell(direction, duration: duration, tableView: tableView, selectedIndexPaht: currentIndex, close: false)
}
}
}
// MARK: ScroolViewDelegate
extension PTTableViewController {
override public func scrollViewDidScroll(scrollView: UIScrollView) {
parallaxOffsetDidChange(scrollView.contentOffset.y)
}
}
open override func scrollViewDidScroll(_ scrollView: UIScrollView) {
parallaxOffsetDidChange(scrollView.contentOffset.y)
}
}
@@ -0,0 +1,58 @@
//
// LayerAnimationHelper.swift
// PreviewTransitionDemo
//
// Created by Alex K. on 03/05/16.
// Copyright © 2016 Alex K. All rights reserved.
//
import UIKit
extension UIView {
private func createAnimationFromKey(key: String, duration: Double, from: CGFloat, to: CGFloat, delay: Double = 0, remove: Bool = true) -> CABasicAnimation {
let animation = CABasicAnimation(keyPath: key)
animation.duration = duration
animation.toValue = to
animation.fromValue = from
animation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut)
animation.beginTime = CACurrentMediaTime() + delay
if remove == false {
animation.isRemovedOnCompletion = remove
animation.fillMode = CAMediaTimingFillMode.forwards
}
return animation
}
func rotateDuration(duration: Double, from: CGFloat, to: CGFloat, delay: Double = 0, remove: Bool = true) {
let animation = createAnimationFromKey(key: "transform.rotation.z",
duration: duration,
from: from,
to: to,
delay: delay,
remove: remove)
layer.add(animation, forKey: nil)
}
func scaleDuration(duration: Double, from: CGFloat, to: CGFloat, delay: Double = 0, remove: Bool = true) {
let animation = createAnimationFromKey(key: "transform.scale",
duration: duration,
from: from,
to: to,
delay: delay,
remove: remove)
layer.add(animation, forKey: nil)
}
func opacityDuration(duration: Double, from: CGFloat, to: CGFloat, delay: Double = 0, remove: Bool = true) {
let animation = createAnimationFromKey(key: "opacity",
duration: duration,
from: from,
to: to,
delay: delay,
remove: remove)
layer.add(animation, forKey: nil)
}
}
@@ -0,0 +1,27 @@
// Generated using SwiftGen, by O.Halligon https://github.com/AliSoftware/SwiftGen
import Foundation
import UIKit
extension UIImage {
enum Asset: String {
case _1 = "1"
case _2 = "2"
case _3 = "3"
case _4 = "4"
case _5 = "5"
case Back = "back"
case HertIcon
case PlusIcon
case ShareIcon
case TransparentPixel
var image: UIImage {
return UIImage(asset: self)
}
}
convenience init!(asset: Asset) {
self.init(named: asset.rawValue)
}
}
@@ -0,0 +1,293 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
84A36E321CD8E34600AEC2F2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A36E311CD8E34600AEC2F2 /* AppDelegate.swift */; };
84A36E341CD8E34600AEC2F2 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A36E331CD8E34600AEC2F2 /* ViewController.swift */; };
84A36E371CD8E34600AEC2F2 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 84A36E351CD8E34600AEC2F2 /* Main.storyboard */; };
84A36E391CD8E34600AEC2F2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 84A36E381CD8E34600AEC2F2 /* Assets.xcassets */; };
84A36E3C1CD8E34600AEC2F2 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 84A36E3A1CD8E34600AEC2F2 /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
84A36E2E1CD8E34600AEC2F2 /* TextFont.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TextFont.app; sourceTree = BUILT_PRODUCTS_DIR; };
84A36E311CD8E34600AEC2F2 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
84A36E331CD8E34600AEC2F2 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
84A36E361CD8E34600AEC2F2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
84A36E381CD8E34600AEC2F2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
84A36E3B1CD8E34600AEC2F2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
84A36E3D1CD8E34600AEC2F2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
84A36E2B1CD8E34600AEC2F2 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
84A36E251CD8E34600AEC2F2 = {
isa = PBXGroup;
children = (
84A36E301CD8E34600AEC2F2 /* TextFont */,
84A36E2F1CD8E34600AEC2F2 /* Products */,
);
sourceTree = "<group>";
};
84A36E2F1CD8E34600AEC2F2 /* Products */ = {
isa = PBXGroup;
children = (
84A36E2E1CD8E34600AEC2F2 /* TextFont.app */,
);
name = Products;
sourceTree = "<group>";
};
84A36E301CD8E34600AEC2F2 /* TextFont */ = {
isa = PBXGroup;
children = (
84A36E311CD8E34600AEC2F2 /* AppDelegate.swift */,
84A36E331CD8E34600AEC2F2 /* ViewController.swift */,
84A36E351CD8E34600AEC2F2 /* Main.storyboard */,
84A36E381CD8E34600AEC2F2 /* Assets.xcassets */,
84A36E3A1CD8E34600AEC2F2 /* LaunchScreen.storyboard */,
84A36E3D1CD8E34600AEC2F2 /* Info.plist */,
);
path = TextFont;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
84A36E2D1CD8E34600AEC2F2 /* TextFont */ = {
isa = PBXNativeTarget;
buildConfigurationList = 84A36E401CD8E34600AEC2F2 /* Build configuration list for PBXNativeTarget "TextFont" */;
buildPhases = (
84A36E2A1CD8E34600AEC2F2 /* Sources */,
84A36E2B1CD8E34600AEC2F2 /* Frameworks */,
84A36E2C1CD8E34600AEC2F2 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = TextFont;
productName = TextFont;
productReference = 84A36E2E1CD8E34600AEC2F2 /* TextFont.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
84A36E261CD8E34600AEC2F2 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0730;
ORGANIZATIONNAME = "Alex K.";
TargetAttributes = {
84A36E2D1CD8E34600AEC2F2 = {
CreatedOnToolsVersion = 7.3;
};
};
};
buildConfigurationList = 84A36E291CD8E34600AEC2F2 /* Build configuration list for PBXProject "TextFont" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 84A36E251CD8E34600AEC2F2;
productRefGroup = 84A36E2F1CD8E34600AEC2F2 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
84A36E2D1CD8E34600AEC2F2 /* TextFont */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
84A36E2C1CD8E34600AEC2F2 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
84A36E3C1CD8E34600AEC2F2 /* LaunchScreen.storyboard in Resources */,
84A36E391CD8E34600AEC2F2 /* Assets.xcassets in Resources */,
84A36E371CD8E34600AEC2F2 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
84A36E2A1CD8E34600AEC2F2 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
84A36E341CD8E34600AEC2F2 /* ViewController.swift in Sources */,
84A36E321CD8E34600AEC2F2 /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
84A36E351CD8E34600AEC2F2 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
84A36E361CD8E34600AEC2F2 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
84A36E3A1CD8E34600AEC2F2 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
84A36E3B1CD8E34600AEC2F2 /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
84A36E3E1CD8E34600AEC2F2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
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.3;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
84A36E3F1CD8E34600AEC2F2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
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.3;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
84A36E411CD8E34600AEC2F2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = TextFont/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.TextFont;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
84A36E421CD8E34600AEC2F2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = TextFont/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.TextFont;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
84A36E291CD8E34600AEC2F2 /* Build configuration list for PBXProject "TextFont" */ = {
isa = XCConfigurationList;
buildConfigurations = (
84A36E3E1CD8E34600AEC2F2 /* Debug */,
84A36E3F1CD8E34600AEC2F2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
84A36E401CD8E34600AEC2F2 /* Build configuration list for PBXNativeTarget "TextFont" */ = {
isa = XCConfigurationList;
buildConfigurations = (
84A36E411CD8E34600AEC2F2 /* Debug */,
84A36E421CD8E34600AEC2F2 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
/* End XCConfigurationList section */
};
rootObject = 84A36E261CD8E34600AEC2F2 /* Project object */;
}
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:TextFont.xcodeproj">
</FileRef>
</Workspace>
@@ -0,0 +1,42 @@
//
// AppDelegate.swift
// TextFont
//
// Created by Alex K. on 03/05/16.
// Copyright © 2016 Alex K. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application _: UIApplication, didFinishLaunchingWithOptions _: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
func applicationWillResignActive(application _: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
func applicationDidEnterBackground(application _: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(application _: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
func applicationDidBecomeActive(application _: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
func applicationWillTerminate(application _: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}
@@ -0,0 +1,38 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -0,0 +1,27 @@
<?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">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<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/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="TextFont" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YDQ-fv-Uj7">
<rect key="frame" x="279" y="289" width="42" height="21"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="BB9-8F-h5K"/>
<constraint firstAttribute="width" constant="42" id="WtZ-Zq-Td3"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="YDQ-fv-Uj7" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="8xw-2u-gfK"/>
<constraint firstItem="YDQ-fv-Uj7" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY" id="xxa-bA-5hV"/>
</constraints>
</view>
<connections>
<outlet property="lableText" destination="YDQ-fv-Uj7" id="JeG-Q9-ULC"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="305" y="421"/>
</scene>
</scenes>
</document>
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
@@ -0,0 +1,37 @@
//
// ViewController.swift
// TextFont
//
// Created by Alex K. on 03/05/16.
// Copyright © 2016 Alex K. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet var lableText: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
let animation = CABasicAnimation(keyPath: "fontSize")
animation.toValue = 10
animation.duration = 3
let textLayer = CATextLayer()
textLayer.font = UIFont.systemFontOfSize(50)
textLayer.fontSize = 50
textLayer.string = "text"
textLayer.foregroundColor = UIColor.redColor().CGColor
textLayer.backgroundColor = UIColor.blackColor().CGColor
textLayer.frame = CGRect(x: 100, y: 100, width: 100, height: 100)
view.layer.addSublayer(textLayer)
lableText.layer.addAnimation(animation, forKey: nil)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
@@ -13,12 +13,14 @@
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
@@ -0,0 +1,19 @@
//
// PreivewTransition.h
// PreivewTransition
//
// Created by Alex K. on 02/06/16.
// Copyright © 2016 Alex K. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for PreivewTransition.
FOUNDATION_EXPORT double PreivewTransitionVersionNumber;
//! Project version string for PreivewTransition.
FOUNDATION_EXPORT const unsigned char PreivewTransitionVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <PreivewTransition/PublicHeader.h>
@@ -8,38 +8,56 @@
/* Begin PBXBuildFile section */
8416D9EA1CB28E2600BB599D /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8416D9E91CB28E2600BB599D /* Extensions.swift */; };
8416D9EB1CB28E2600BB599D /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8416D9E91CB28E2600BB599D /* Extensions.swift */; };
84204DFD1CB2869E001FC263 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204DFC1CB2869E001FC263 /* AppDelegate.swift */; };
84204E021CB2869E001FC263 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 84204E001CB2869E001FC263 /* Main.storyboard */; };
84204E041CB2869E001FC263 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 84204E031CB2869E001FC263 /* Assets.xcassets */; };
84204E071CB2869E001FC263 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 84204E051CB2869E001FC263 /* LaunchScreen.storyboard */; };
84204E121CB2869E001FC263 /* PreviewTransitionDemoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204E111CB2869E001FC263 /* PreviewTransitionDemoTests.swift */; };
84204E1F1CB289B3001FC263 /* PTDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204E1E1CB289B3001FC263 /* PTDetailViewController.swift */; };
84204E281CB289DC001FC263 /* ParallaxCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204E221CB289DC001FC263 /* ParallaxCell.swift */; };
84204E291CB289DC001FC263 /* TimeExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204E241CB289DC001FC263 /* TimeExtensions.swift */; };
84204E2A1CB289DC001FC263 /* MovingViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204E261CB289DC001FC263 /* MovingViews.swift */; };
84204E2B1CB289DC001FC263 /* PTTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204E271CB289DC001FC263 /* PTTableViewController.swift */; };
84204E2F1CB28B5B001FC263 /* DemoDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204E2D1CB28B5B001FC263 /* DemoDetailViewController.swift */; };
84204E301CB28B5B001FC263 /* DemoDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204E2D1CB28B5B001FC263 /* DemoDetailViewController.swift */; };
84204E311CB28B5B001FC263 /* DemoTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204E2E1CB28B5B001FC263 /* DemoTableViewController.swift */; };
84204E321CB28B5B001FC263 /* DemoTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204E2E1CB28B5B001FC263 /* DemoTableViewController.swift */; };
842D7E9B1CB395C800DE59DE /* ParallaxCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204E221CB289DC001FC263 /* ParallaxCell.swift */; };
842D7E9C1CB395D900DE59DE /* PTTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204E271CB289DC001FC263 /* PTTableViewController.swift */; };
842D7E9D1CB395FC00DE59DE /* TimeExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204E241CB289DC001FC263 /* TimeExtensions.swift */; };
842D7E9E1CB3960200DE59DE /* MovingViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204E261CB289DC001FC263 /* MovingViews.swift */; };
842D7E9F1CB3960A00DE59DE /* PTDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204E1E1CB289B3001FC263 /* PTDetailViewController.swift */; };
848526521CD39CFB0052BEAD /* Images.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848526511CD39CFB0052BEAD /* Images.swift */; };
848BD7E51CCF54620046DC13 /* ConstraintsHalper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848BD7E41CCF54620046DC13 /* ConstraintsHalper.swift */; };
8499D8BA1D006020004B5B37 /* PreivewTransition.h in Headers */ = {isa = PBXBuildFile; fileRef = 8499D8B91D006020004B5B37 /* PreivewTransition.h */; settings = {ATTRIBUTES = (Public, ); }; };
8499D8BE1D006020004B5B37 /* PreviewTransition.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8499D8B71D006020004B5B37 /* PreviewTransition.framework */; };
8499D8BF1D006020004B5B37 /* PreviewTransition.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8499D8B71D006020004B5B37 /* PreviewTransition.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
8499D8C41D006062004B5B37 /* ConstraintsHalper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848BD7E41CCF54620046DC13 /* ConstraintsHalper.swift */; };
8499D8C51D006066004B5B37 /* ParallaxCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204E221CB289DC001FC263 /* ParallaxCell.swift */; };
8499D8C61D00607B004B5B37 /* TimeExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204E241CB289DC001FC263 /* TimeExtensions.swift */; };
8499D8C71D006082004B5B37 /* MovingViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204E261CB289DC001FC263 /* MovingViews.swift */; };
8499D8C81D006085004B5B37 /* PTTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204E271CB289DC001FC263 /* PTTableViewController.swift */; };
8499D8C91D00608B004B5B37 /* PTDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84204E1E1CB289B3001FC263 /* PTDetailViewController.swift */; };
84A36E0E1CD88EEA00AEC2F2 /* LayerAnimationHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A36E0D1CD88EEA00AEC2F2 /* LayerAnimationHelper.swift */; };
84A36E141CD8C70F00AEC2F2 /* ScreenShot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A36E131CD8C70F00AEC2F2 /* ScreenShot.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
84204E0E1CB2869E001FC263 /* PBXContainerItemProxy */ = {
8499D8BC1D006020004B5B37 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 84204DF11CB2869E001FC263 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 84204DF81CB2869E001FC263;
remoteInfo = PreviewTransitionDemo;
remoteGlobalIDString = 8499D8B61D006020004B5B37;
remoteInfo = PreivewTransition;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
8499D8C31D006020004B5B37 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
8499D8BF1D006020004B5B37 /* PreviewTransition.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
8416D9E91CB28E2600BB599D /* Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; };
84204DF91CB2869E001FC263 /* PreviewTransitionDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PreviewTransitionDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -48,9 +66,6 @@
84204E031CB2869E001FC263 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
84204E061CB2869E001FC263 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
84204E081CB2869E001FC263 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
84204E0D1CB2869E001FC263 /* PreviewTransitionDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PreviewTransitionDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
84204E111CB2869E001FC263 /* PreviewTransitionDemoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreviewTransitionDemoTests.swift; sourceTree = "<group>"; };
84204E131CB2869E001FC263 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
84204E1E1CB289B3001FC263 /* PTDetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PTDetailViewController.swift; sourceTree = "<group>"; };
84204E221CB289DC001FC263 /* ParallaxCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ParallaxCell.swift; sourceTree = "<group>"; };
84204E241CB289DC001FC263 /* TimeExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TimeExtensions.swift; sourceTree = "<group>"; };
@@ -58,6 +73,13 @@
84204E271CB289DC001FC263 /* PTTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PTTableViewController.swift; sourceTree = "<group>"; };
84204E2D1CB28B5B001FC263 /* DemoDetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DemoDetailViewController.swift; sourceTree = "<group>"; };
84204E2E1CB28B5B001FC263 /* DemoTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DemoTableViewController.swift; sourceTree = "<group>"; };
848526511CD39CFB0052BEAD /* Images.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Images.swift; sourceTree = "<group>"; };
848BD7E41CCF54620046DC13 /* ConstraintsHalper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConstraintsHalper.swift; sourceTree = "<group>"; };
8499D8B71D006020004B5B37 /* PreviewTransition.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PreviewTransition.framework; sourceTree = BUILT_PRODUCTS_DIR; };
8499D8B91D006020004B5B37 /* PreivewTransition.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PreivewTransition.h; sourceTree = "<group>"; };
8499D8BB1D006020004B5B37 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
84A36E0D1CD88EEA00AEC2F2 /* LayerAnimationHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayerAnimationHelper.swift; sourceTree = "<group>"; };
84A36E131CD8C70F00AEC2F2 /* ScreenShot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScreenShot.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -65,10 +87,11 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8499D8BE1D006020004B5B37 /* PreviewTransition.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
84204E0A1CB2869E001FC263 /* Frameworks */ = {
8499D8B31D006020004B5B37 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -89,9 +112,11 @@
84204DF01CB2869E001FC263 = {
isa = PBXGroup;
children = (
84A36E111CD8C31C00AEC2F2 /* Helpers */,
848526501CD39CDD0052BEAD /* Constants */,
84204E1C1CB286DD001FC263 /* PreviewTransition */,
84204DFB1CB2869E001FC263 /* PreviewTransitionDemo */,
84204E101CB2869E001FC263 /* PreviewTransitionDemoTests */,
8499D8B81D006020004B5B37 /* PreivewTransition */,
84204DFA1CB2869E001FC263 /* Products */,
);
sourceTree = "<group>";
@@ -100,7 +125,7 @@
isa = PBXGroup;
children = (
84204DF91CB2869E001FC263 /* PreviewTransitionDemo.app */,
84204E0D1CB2869E001FC263 /* PreviewTransitionDemoTests.xctest */,
8499D8B71D006020004B5B37 /* PreviewTransition.framework */,
);
name = Products;
sourceTree = "<group>";
@@ -119,15 +144,6 @@
path = PreviewTransitionDemo;
sourceTree = "<group>";
};
84204E101CB2869E001FC263 /* PreviewTransitionDemoTests */ = {
isa = PBXGroup;
children = (
84204E111CB2869E001FC263 /* PreviewTransitionDemoTests.swift */,
84204E131CB2869E001FC263 /* Info.plist */,
);
path = PreviewTransitionDemoTests;
sourceTree = "<group>";
};
84204E1C1CB286DD001FC263 /* PreviewTransition */ = {
isa = PBXGroup;
children = (
@@ -149,6 +165,7 @@
84204E201CB289C6001FC263 /* TableViewController */ = {
isa = PBXGroup;
children = (
848BD7E31CCF54300046DC13 /* Halpers */,
84204E211CB289DC001FC263 /* Cell */,
84204E231CB289DC001FC263 /* Extensions */,
84204E251CB289DC001FC263 /* MovingLabel */,
@@ -191,8 +208,70 @@
path = ViewController;
sourceTree = "<group>";
};
848526501CD39CDD0052BEAD /* Constants */ = {
isa = PBXGroup;
children = (
848526511CD39CFB0052BEAD /* Images.swift */,
);
path = Constants;
sourceTree = "<group>";
};
848BD7E31CCF54300046DC13 /* Halpers */ = {
isa = PBXGroup;
children = (
848BD7E41CCF54620046DC13 /* ConstraintsHalper.swift */,
);
path = Halpers;
sourceTree = "<group>";
};
8499D8B81D006020004B5B37 /* PreivewTransition */ = {
isa = PBXGroup;
children = (
8499D8B91D006020004B5B37 /* PreivewTransition.h */,
8499D8BB1D006020004B5B37 /* Info.plist */,
);
path = PreivewTransition;
sourceTree = "<group>";
};
84A36E0C1CD88EB200AEC2F2 /* AnimationHelpers */ = {
isa = PBXGroup;
children = (
84A36E0D1CD88EEA00AEC2F2 /* LayerAnimationHelper.swift */,
);
path = AnimationHelpers;
sourceTree = "<group>";
};
84A36E111CD8C31C00AEC2F2 /* Helpers */ = {
isa = PBXGroup;
children = (
84A36E121CD8C32600AEC2F2 /* ScreenShot */,
84A36E0C1CD88EB200AEC2F2 /* AnimationHelpers */,
);
name = Helpers;
sourceTree = "<group>";
};
84A36E121CD8C32600AEC2F2 /* ScreenShot */ = {
isa = PBXGroup;
children = (
84A36E131CD8C70F00AEC2F2 /* ScreenShot.swift */,
);
name = ScreenShot;
path = ScreenShort;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
8499D8B41D006020004B5B37 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
8499D8BA1D006020004B5B37 /* PreivewTransition.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
84204DF81CB2869E001FC263 /* PreviewTransitionDemo */ = {
isa = PBXNativeTarget;
@@ -201,33 +280,35 @@
84204DF51CB2869E001FC263 /* Sources */,
84204DF61CB2869E001FC263 /* Frameworks */,
84204DF71CB2869E001FC263 /* Resources */,
8499D8C31D006020004B5B37 /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
8499D8BD1D006020004B5B37 /* PBXTargetDependency */,
);
name = PreviewTransitionDemo;
productName = PreviewTransitionDemo;
productReference = 84204DF91CB2869E001FC263 /* PreviewTransitionDemo.app */;
productType = "com.apple.product-type.application";
};
84204E0C1CB2869E001FC263 /* PreviewTransitionDemoTests */ = {
8499D8B61D006020004B5B37 /* PreviewTransition */ = {
isa = PBXNativeTarget;
buildConfigurationList = 84204E191CB2869E001FC263 /* Build configuration list for PBXNativeTarget "PreviewTransitionDemoTests" */;
buildConfigurationList = 8499D8C21D006020004B5B37 /* Build configuration list for PBXNativeTarget "PreviewTransition" */;
buildPhases = (
84204E091CB2869E001FC263 /* Sources */,
84204E0A1CB2869E001FC263 /* Frameworks */,
84204E0B1CB2869E001FC263 /* Resources */,
8499D8B21D006020004B5B37 /* Sources */,
8499D8B31D006020004B5B37 /* Frameworks */,
8499D8B41D006020004B5B37 /* Headers */,
8499D8B51D006020004B5B37 /* Resources */,
);
buildRules = (
);
dependencies = (
84204E0F1CB2869E001FC263 /* PBXTargetDependency */,
);
name = PreviewTransitionDemoTests;
productName = PreviewTransitionDemoTests;
productReference = 84204E0D1CB2869E001FC263 /* PreviewTransitionDemoTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
name = PreviewTransition;
productName = PreivewTransition;
productReference = 8499D8B71D006020004B5B37 /* PreviewTransition.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
@@ -236,21 +317,24 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0730;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "Alex K.";
TargetAttributes = {
84204DF81CB2869E001FC263 = {
CreatedOnToolsVersion = 7.3;
DevelopmentTeam = 34MUF9YXTA;
LastSwiftMigration = 1020;
};
84204E0C1CB2869E001FC263 = {
CreatedOnToolsVersion = 7.3;
TestTargetID = 84204DF81CB2869E001FC263;
8499D8B61D006020004B5B37 = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = LEAZS7L33U;
LastSwiftMigration = 1020;
};
};
};
buildConfigurationList = 84204DF41CB2869E001FC263 /* Build configuration list for PBXProject "PreviewTransitionDemo" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
@@ -262,7 +346,7 @@
projectRoot = "";
targets = (
84204DF81CB2869E001FC263 /* PreviewTransitionDemo */,
84204E0C1CB2869E001FC263 /* PreviewTransitionDemoTests */,
8499D8B61D006020004B5B37 /* PreviewTransition */,
);
};
/* End PBXProject section */
@@ -278,7 +362,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
84204E0B1CB2869E001FC263 /* Resources */ = {
8499D8B51D006020004B5B37 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -295,38 +379,39 @@
84204E1F1CB289B3001FC263 /* PTDetailViewController.swift in Sources */,
8416D9EA1CB28E2600BB599D /* Extensions.swift in Sources */,
84204E2A1CB289DC001FC263 /* MovingViews.swift in Sources */,
848526521CD39CFB0052BEAD /* Images.swift in Sources */,
84204E281CB289DC001FC263 /* ParallaxCell.swift in Sources */,
84204E291CB289DC001FC263 /* TimeExtensions.swift in Sources */,
84A36E141CD8C70F00AEC2F2 /* ScreenShot.swift in Sources */,
84204E311CB28B5B001FC263 /* DemoTableViewController.swift in Sources */,
848BD7E51CCF54620046DC13 /* ConstraintsHalper.swift in Sources */,
84204E2B1CB289DC001FC263 /* PTTableViewController.swift in Sources */,
84204DFD1CB2869E001FC263 /* AppDelegate.swift in Sources */,
84A36E0E1CD88EEA00AEC2F2 /* LayerAnimationHelper.swift in Sources */,
84204E2F1CB28B5B001FC263 /* DemoDetailViewController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
84204E091CB2869E001FC263 /* Sources */ = {
8499D8B21D006020004B5B37 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
842D7E9B1CB395C800DE59DE /* ParallaxCell.swift in Sources */,
84204E301CB28B5B001FC263 /* DemoDetailViewController.swift in Sources */,
842D7E9E1CB3960200DE59DE /* MovingViews.swift in Sources */,
84204E121CB2869E001FC263 /* PreviewTransitionDemoTests.swift in Sources */,
842D7E9F1CB3960A00DE59DE /* PTDetailViewController.swift in Sources */,
84204E321CB28B5B001FC263 /* DemoTableViewController.swift in Sources */,
8416D9EB1CB28E2600BB599D /* Extensions.swift in Sources */,
842D7E9C1CB395D900DE59DE /* PTTableViewController.swift in Sources */,
842D7E9D1CB395FC00DE59DE /* TimeExtensions.swift in Sources */,
8499D8C61D00607B004B5B37 /* TimeExtensions.swift in Sources */,
8499D8C91D00608B004B5B37 /* PTDetailViewController.swift in Sources */,
8499D8C51D006066004B5B37 /* ParallaxCell.swift in Sources */,
8499D8C71D006082004B5B37 /* MovingViews.swift in Sources */,
8499D8C41D006062004B5B37 /* ConstraintsHalper.swift in Sources */,
8499D8C81D006085004B5B37 /* PTTableViewController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
84204E0F1CB2869E001FC263 /* PBXTargetDependency */ = {
8499D8BD1D006020004B5B37 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 84204DF81CB2869E001FC263 /* PreviewTransitionDemo */;
targetProxy = 84204E0E1CB2869E001FC263 /* PBXContainerItemProxy */;
target = 8499D8B61D006020004B5B37 /* PreviewTransition */;
targetProxy = 8499D8BC1D006020004B5B37 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
@@ -354,18 +439,29 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -387,7 +483,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -399,18 +495,29 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -426,9 +533,10 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
VALIDATE_PRODUCT = YES;
};
name = Release;
@@ -436,48 +544,84 @@
84204E171CB2869E001FC263 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = 34MUF9YXTA;
INFOPLIST_FILE = PreviewTransitionDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.PreviewTransitionDemo;
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.dev;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
84204E181CB2869E001FC263 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = 34MUF9YXTA;
INFOPLIST_FILE = PreviewTransitionDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.PreviewTransitionDemo;
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.dev;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_VERSION = 5.0;
};
name = Release;
};
84204E1A1CB2869E001FC263 /* Debug */ = {
8499D8C01D006020004B5B37 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
INFOPLIST_FILE = PreviewTransitionDemoTests/Info.plist;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = PreivewTransition/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.PreviewTransitionDemoTests;
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.PreivewTransition;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PreviewTransitionDemo.app/PreviewTransitionDemo";
SKIP_INSTALL = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
84204E1B1CB2869E001FC263 /* Release */ = {
8499D8C11D006020004B5B37 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
INFOPLIST_FILE = PreviewTransitionDemoTests/Info.plist;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = PreivewTransition/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.PreviewTransitionDemoTests;
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.PreivewTransition;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PreviewTransitionDemo.app/PreviewTransitionDemo";
SKIP_INSTALL = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
@@ -502,11 +646,11 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
84204E191CB2869E001FC263 /* Build configuration list for PBXNativeTarget "PreviewTransitionDemoTests" */ = {
8499D8C21D006020004B5B37 /* Build configuration list for PBXNativeTarget "PreviewTransition" */ = {
isa = XCConfigurationList;
buildConfigurations = (
84204E1A1CB2869E001FC263 /* Debug */,
84204E1B1CB2869E001FC263 /* Release */,
8499D8C01D006020004B5B37 /* Debug */,
8499D8C11D006020004B5B37 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -14,9 +14,9 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "84204DF81CB2869E001FC263"
BuildableName = "PreviewTransitionDemo.app"
BlueprintName = "PreviewTransitionDemo"
BlueprintIdentifier = "8499D8B61D006020004B5B37"
BuildableName = "PreviewTransition.framework"
BlueprintName = "PreviewTransition"
ReferencedContainer = "container:PreviewTransitionDemo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
@@ -28,26 +28,7 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "84204E0C1CB2869E001FC263"
BuildableName = "PreviewTransitionDemoTests.xctest"
BlueprintName = "PreviewTransitionDemoTests"
ReferencedContainer = "container:PreviewTransitionDemo.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "84204DF81CB2869E001FC263"
BuildableName = "PreviewTransitionDemo.app"
BlueprintName = "PreviewTransitionDemo"
ReferencedContainer = "container:PreviewTransitionDemo.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
@@ -61,16 +42,15 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "84204DF81CB2869E001FC263"
BuildableName = "PreviewTransitionDemo.app"
BlueprintName = "PreviewTransitionDemo"
BlueprintIdentifier = "8499D8B61D006020004B5B37"
BuildableName = "PreviewTransition.framework"
BlueprintName = "PreviewTransition"
ReferencedContainer = "container:PreviewTransitionDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
@@ -80,16 +60,15 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "84204DF81CB2869E001FC263"
BuildableName = "PreviewTransitionDemo.app"
BlueprintName = "PreviewTransitionDemo"
BlueprintIdentifier = "8499D8B61D006020004B5B37"
BuildableName = "PreviewTransition.framework"
BlueprintName = "PreviewTransition"
ReferencedContainer = "container:PreviewTransitionDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
@@ -11,77 +11,26 @@ import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
configureStatusBar()
configureNavigationBar()
return true
}
func applicationWillResignActive(application: UIApplication) {
}
func applicationDidEnterBackground(application: UIApplication) {
}
func applicationWillEnterForeground(application: UIApplication) {
}
func applicationDidBecomeActive(application: UIApplication) {
}
func applicationWillTerminate(application: UIApplication) {
}
func applicationDidFinishLaunching(_: UIApplication) {
configureNavigationBar()
}
}
extension AppDelegate {
private func configureNavigationBar() {
UINavigationBar.appearance().setBackgroundImage(UIImage(), forBarMetrics: .Default)
UINavigationBar.appearance().shadowImage = UIImage()
UINavigationBar.appearance().translucent = true
UINavigationBar.appearance().tintColor = .whiteColor()
if let font = UIFont(name: "Avenir-medium" , size: 18) {
UINavigationBar.appearance().titleTextAttributes = [
NSForegroundColorAttributeName : UIColor.whiteColor(),
NSFontAttributeName : font
]
}
guard let navigationController = window?.rootViewController as? UINavigationController else {
return
}
let gradient = getGradientView(CGRect(x: 0,
y: 0,
width: UIScreen.mainScreen().bounds.size.width,
height: navigationController.navigationBar.bounds.size.height))
navigationController.navigationBar.addSubview(gradient)
}
private func getGradientView(frame: CGRect) -> UIView {
let gradientView: UIView = UIView(frame: frame)
let gradient: CAGradientLayer = CAGradientLayer()
gradient.frame = gradientView.bounds
gradient.colors = [UIColor(red: 0.0, green: 0.0, blue: 0.0, alpha: 0.2).CGColor,
UIColor.clearColor().CGColor]
gradientView.layer.insertSublayer(gradient, atIndex: 0)
return gradientView
}
private func configureStatusBar() {
guard let statusBar = UIApplication.sharedApplication().valueForKey("statusBarWindow")?.valueForKey("statusBar") as? UIView else {
return
}
statusBar.backgroundColor = UIColor(red: 0.0, green: 0.0, blue: 0.0, alpha: 0.2)
UIApplication.sharedApplication().statusBarStyle = .LightContent
}
}
fileprivate func configureNavigationBar() {
//transparent background
UINavigationBar.appearance().setBackgroundImage(UIImage(), for: .default)
UINavigationBar.appearance().shadowImage = UIImage()
UINavigationBar.appearance().isTranslucent = true
if let font = UIFont(name: "Avenir-medium", size: 18) {
UINavigationBar.appearance().titleTextAttributes = [
NSAttributedString.Key.foregroundColor: UIColor.white,
NSAttributedString.Key.font: font,
]
}
}
}
@@ -1,38 +1,119 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "icon-40.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "icon-60.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon-58.png",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"idiom" : "iphone",
"filename" : "icon-87.png",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"idiom" : "iphone",
"filename" : "icon-80.png",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"idiom" : "iphone",
"filename" : "icon-120.png",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"idiom" : "iphone",
"filename" : "icon-120.png",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"idiom" : "iphone",
"filename" : "icon-180.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "icon-20.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "icon-40.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "icon-29.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "icon-58.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "icon-40.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "icon-80.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "icon-76.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "icon-152.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "icon-167.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Ramotion.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"pre-rendered" : true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

@@ -0,0 +1 @@
{ "images" : [{"idiom" : "universal", "filename" : "universal_HertIcon.pdf"} ], "info" : { "version" : 1, "author" : "xcode" }}
@@ -0,0 +1 @@
{ "images" : [{"idiom" : "universal", "filename" : "universal_PlusIcon.pdf"} ], "info" : { "version" : 1, "author" : "xcode" }}
@@ -0,0 +1 @@
{ "images" : [{"idiom" : "universal", "filename" : "universal_ShareIcon.pdf"} ], "info" : { "version" : 1, "author" : "xcode" }}
@@ -0,0 +1 @@
{ "images" : [{"idiom" : "universal", "filename" : "universal_back.pdf"} ], "info" : { "version" : 1, "author" : "xcode" }}
@@ -1,8 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
@@ -14,14 +19,35 @@
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2018 Ramotion. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fcf-sN-ku0">
<rect key="frame" x="16" y="630" width="343" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Preview Transition" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bCd-3b-lHA">
<rect key="frame" x="111.5" y="323" width="152" height="21"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="fcf-sN-ku0" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leadingMargin" id="811-hI-Egq"/>
<constraint firstItem="bCd-3b-lHA" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="T4x-O3-JqD"/>
<constraint firstItem="bCd-3b-lHA" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="VFr-tp-sPw"/>
<constraint firstItem="fcf-sN-ku0" firstAttribute="trailing" secondItem="Ze5-6b-2t3" secondAttribute="trailingMargin" id="dS9-pv-ebe"/>
<constraint firstItem="xb3-aO-Qok" firstAttribute="top" secondItem="fcf-sN-ku0" secondAttribute="bottom" constant="20" id="kbD-dX-t3N"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
<point key="canvasLocation" x="52" y="374.66266866566718"/>
</scene>
</scenes>
</document>
@@ -1,26 +1,41 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="rNz-sP-Qod">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="rNz-sP-Qod">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<customFonts key="customFonts">
<array key="Avenir.ttc">
<string>Avenir-Medium</string>
</array>
</customFonts>
<scenes>
<!--Demo Table View Controller-->
<scene sceneID="TS0-JK-FG8">
<objects>
<tableViewController storyboardIdentifier="DemoTableViewController" id="R4r-KK-4wR" customClass="DemoTableViewController" customModule="PreviewTransitionDemo" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="240" sectionHeaderHeight="28" sectionFooterHeight="28" id="bOE-4i-fSR">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="240" sectionHeaderHeight="28" sectionFooterHeight="28" id="bOE-4i-fSR">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="ParallaxCell" id="AII-q7-Txi" customClass="ParallaxCell" customModule="PreviewTransitionDemo" customModuleProvider="target">
<rect key="frame" x="0.0" y="92" width="600" height="240"/>
<rect key="frame" x="0.0" y="28" width="375" height="240"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="AII-q7-Txi" id="dOL-VB-4JN">
<rect key="frame" x="0.0" y="0.0" width="600" height="239"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="239.5"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="separatorColor">
<color key="value" red="1" green="0.5" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</tableViewCell>
</prototypes>
<connections>
@@ -42,15 +57,88 @@
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<view key="view" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="e87-Lw-D6d" userLabel="ControlsViewContainer">
<rect key="frame" x="0.0" y="592" width="375" height="75"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bep-Nt-aTe" userLabel="ControlsView">
<rect key="frame" x="0.0" y="0.0" width="375" height="75"/>
<subviews>
<imageView userInteractionEnabled="NO" alpha="0.65000000000000002" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="PlusIcon" translatesAutoresizingMaskIntoConstraints="NO" id="cNu-DQ-KVS">
<rect key="frame" x="26" y="23.5" width="28" height="28"/>
<constraints>
<constraint firstAttribute="width" constant="28" id="Oez-4a-Ajf"/>
<constraint firstAttribute="height" constant="28" id="dVU-d2-hQD"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" alpha="0.65000000000000002" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="UPLOAD" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="of2-Mb-6dK">
<rect key="frame" x="72" y="26.5" width="65.5" height="22"/>
<fontDescription key="fontDescription" name="Avenir-Medium" family="Avenir" pointSize="16"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" alpha="0.65000000000000002" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="HertIcon" translatesAutoresizingMaskIntoConstraints="NO" id="qf5-7H-m8I">
<rect key="frame" x="329" y="27.5" width="20" height="20"/>
<constraints>
<constraint firstAttribute="width" constant="20" id="7vC-Kj-Xhh"/>
<constraint firstAttribute="height" constant="20" id="y9j-Rr-ADZ"/>
</constraints>
</imageView>
<imageView userInteractionEnabled="NO" alpha="0.65000000000000002" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ShareIcon" translatesAutoresizingMaskIntoConstraints="NO" id="fYq-Bm-C3g">
<rect key="frame" x="278" y="27.5" width="20" height="20"/>
<constraints>
<constraint firstAttribute="width" constant="20" id="AdG-0M-DE8"/>
<constraint firstAttribute="height" constant="20" id="npa-OF-Phw"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" red="0.2418571412563324" green="0.17698898911476135" blue="0.1230514720082283" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="qf5-7H-m8I" firstAttribute="centerY" secondItem="bep-Nt-aTe" secondAttribute="centerY" id="7Sl-Yf-TPT"/>
<constraint firstItem="qf5-7H-m8I" firstAttribute="leading" secondItem="fYq-Bm-C3g" secondAttribute="trailing" constant="31" id="CbF-3f-1Rz"/>
<constraint firstItem="fYq-Bm-C3g" firstAttribute="centerY" secondItem="bep-Nt-aTe" secondAttribute="centerY" id="Q7R-nz-kDO"/>
<constraint firstItem="cNu-DQ-KVS" firstAttribute="centerY" secondItem="bep-Nt-aTe" secondAttribute="centerY" id="VSr-aL-49x"/>
<constraint firstAttribute="trailing" secondItem="qf5-7H-m8I" secondAttribute="trailing" constant="26" id="dyM-CD-2Xy"/>
<constraint firstItem="of2-Mb-6dK" firstAttribute="centerY" secondItem="bep-Nt-aTe" secondAttribute="centerY" id="ndt-gV-UNC"/>
<constraint firstItem="cNu-DQ-KVS" firstAttribute="leading" secondItem="bep-Nt-aTe" secondAttribute="leading" constant="26" id="sM2-by-tp2"/>
<constraint firstItem="of2-Mb-6dK" firstAttribute="leading" secondItem="cNu-DQ-KVS" secondAttribute="trailing" constant="18" id="u48-EN-PaD"/>
<constraint firstAttribute="height" constant="75" id="y5q-xC-6PW"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="bep-Nt-aTe" firstAttribute="top" secondItem="e87-Lw-D6d" secondAttribute="top" id="AQh-Mt-Zu0"/>
<constraint firstAttribute="trailing" secondItem="bep-Nt-aTe" secondAttribute="trailing" id="R5F-Ml-C1h"/>
<constraint firstItem="bep-Nt-aTe" firstAttribute="leading" secondItem="e87-Lw-D6d" secondAttribute="leading" id="e33-px-zT6"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="e87-Lw-D6d" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="WtK-eJ-Evt"/>
<constraint firstAttribute="trailing" secondItem="e87-Lw-D6d" secondAttribute="trailing" id="Xfw-qN-wKE"/>
<constraint firstAttribute="bottom" secondItem="e87-Lw-D6d" secondAttribute="bottom" id="Z1u-Zc-6Gx"/>
<constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="bep-Nt-aTe" secondAttribute="bottom" id="qoN-F2-pl4"/>
</constraints>
</view>
<connections>
<outlet property="controlBottomConstrant" destination="qoN-F2-pl4" id="7vP-GT-O7y"/>
<outlet property="controlTextLabel" destination="of2-Mb-6dK" id="8VW-Qx-njJ"/>
<outlet property="controlTextLableLending" destination="u48-EN-PaD" id="THf-Gf-6Oe"/>
<outlet property="controlView" destination="bep-Nt-aTe" id="lB6-d4-1rx"/>
<outlet property="controlsViewContainer" destination="e87-Lw-D6d" id="vqd-db-r0q"/>
<outlet property="hertIconView" destination="qf5-7H-m8I" id="LUd-B6-aY7"/>
<outlet property="plusImageView" destination="cNu-DQ-KVS" id="xQY-UZ-Bve"/>
<outlet property="shareImageView" destination="fYq-Bm-C3g" id="mW0-7l-wPb"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1613" y="484"/>
<point key="canvasLocation" x="1608.8" y="483.50824587706148"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="cXS-jQ-bIr">
@@ -59,8 +147,11 @@
<toolbarItems/>
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics" statusBarStyle="lightContent"/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="crh-l4-DmE">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<textAttributes key="titleTextAttributes">
<color key="textColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
</textAttributes>
</navigationBar>
<nil name="viewControllers"/>
<connections>
@@ -72,4 +163,9 @@
<point key="canvasLocation" x="88" y="484"/>
</scene>
</scenes>
<resources>
<image name="HertIcon" width="31" height="29"/>
<image name="PlusIcon" width="30" height="30"/>
<image name="ShareIcon" width="31" height="30"/>
</resources>
</document>
@@ -26,65 +26,64 @@ import UIKit
// MARK: tableview
extension UITableView {
func getReusableCellWithIdentifier<T: UITableViewCell where T: TableViewCellIdentifiable>(indexPath: NSIndexPath) -> T {
guard let cell = self.dequeueReusableCellWithIdentifier(T.cellIdentifier, forIndexPath: indexPath) as? T else {
fatalError("Couldn't instantiate view controller with identifier \(T.cellIdentifier) ")
func getReusableCellWithIdentifier<T: UITableViewCell>(indexPath: IndexPath) -> T {
guard let cell = self.dequeueReusableCell(withIdentifier: T.cellIdentifier, for: indexPath as IndexPath) as? T else {
fatalError("Couldn't instantiate view controller with identifier \(T.cellIdentifier) ")
}
return cell
}
return cell
}
}
// MARK: UITableViewCell
protocol TableViewCellIdentifiable {
static var cellIdentifier: String { get }
static var cellIdentifier: String { get }
}
extension TableViewCellIdentifiable where Self: UITableViewCell {
static var cellIdentifier: String {
return String(self)
}
static var cellIdentifier: String {
return String(describing: self)
}
}
extension UITableViewCell : TableViewCellIdentifiable { }
extension UITableViewCell: TableViewCellIdentifiable {}
// MARK: storyboard
extension UIStoryboard {
enum Storyboard : String {
case Main
}
convenience init(storyboard: Storyboard, bundle: NSBundle? = nil) {
self.init(name: storyboard.rawValue, bundle: bundle)
}
class func storyboard(storyboard: Storyboard, bundle: NSBundle? = nil) -> UIStoryboard {
return UIStoryboard(name: storyboard.rawValue, bundle: bundle)
}
func instantiateViewController<T: UIViewController where T: StoryboardIdentifiable>() -> T {
guard let viewController = self.instantiateViewControllerWithIdentifier(T.storyboardIdentifier) as? T else {
fatalError("Couldn't instantiate view controller with identifier \(T.storyboardIdentifier) ")
enum Storyboard: String {
case Main
}
convenience init(storyboard: Storyboard, bundle: Bundle? = nil) {
self.init(name: storyboard.rawValue, bundle: bundle)
}
class func storyboard(storyboard: Storyboard, bundle: Bundle? = nil) -> UIStoryboard {
return UIStoryboard(name: storyboard.rawValue, bundle: bundle)
}
func instantiateViewController<T: UIViewController>() -> T {
guard let viewController = self.instantiateViewController(withIdentifier: T.storyboardIdentifier) as? T else {
fatalError("Couldn't instantiate view controller with identifier \(T.storyboardIdentifier) ")
}
return viewController
}
return viewController
}
}
extension UIViewController : StoryboardIdentifiable { }
extension UIViewController: StoryboardIdentifiable {}
// MARK: identifiable
protocol StoryboardIdentifiable {
static var storyboardIdentifier: String { get }
static var storyboardIdentifier: String { get }
}
extension StoryboardIdentifiable where Self: UIViewController {
static var storyboardIdentifier: String {
return String(self)
}
static var storyboardIdentifier: String {
return String(describing: self)
}
}
@@ -30,11 +30,11 @@
<array>
<string>armv7</string>
</array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
@@ -21,51 +21,150 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
import UIKit
public class DemoDetailViewController: PTDetailViewController {
var backButton: UIButton?
@IBOutlet var controlBottomConstrant: NSLayoutConstraint!
// bottom control icons
@IBOutlet var controlsViewContainer: UIView!
@IBOutlet var controlView: UIView!
@IBOutlet var plusImageView: UIImageView!
@IBOutlet var controlTextLabel: UILabel!
@IBOutlet var controlTextLableLending: NSLayoutConstraint!
@IBOutlet var shareImageView: UIImageView!
@IBOutlet var hertIconView: UIImageView!
var backButton: UIButton?
var bottomSafeArea: CGFloat {
var result: CGFloat = 0
if #available(iOS 11.0, *) {
result = UIApplication.shared.keyWindow?.safeAreaInsets.bottom ?? 0
}
return result
}
}
// MARK: life cicle
extension DemoDetailViewController {
public override func viewDidLoad() {
super.viewDidLoad()
backButton = createBackButton()
let buttonItem = UIBarButtonItem(customView: backButton!)
navigationItem.leftBarButtonItem = buttonItem
backButton?.alpha = 0
showBackButton()
}
public override func viewDidLoad() {
super.viewDidLoad()
backButton = createBackButton()
_ = createNavigationBarBackItem(button: backButton)
// animations
showBackButtonDuration(duration: 0.3)
showControlViewDuration(duration: 0.3)
_ = createBlurView()
}
}
// MARK: helpers
extension DemoDetailViewController {
private func createBackButton() -> UIButton {
let button = UIButton(frame: CGRect(x: 0, y: 0, width: 44, height: 44))
button.addTarget(self, action: #selector(DemoDetailViewController.backButtonHandler) , forControlEvents: .TouchUpInside)
button.setTitle("Back", forState: .Normal)
return button
}
private func showBackButton() {
UIView.animateWithDuration(0.2) { () -> Void in
self.backButton?.alpha = 1
fileprivate func createBackButton() -> UIButton {
let button = UIButton(frame: CGRect(x: 0, y: 0, width: 22, height: 44))
button.setImage(UIImage.Asset.Back.image, for: .normal)
button.addTarget(self, action: #selector(DemoDetailViewController.backButtonHandler), for: .touchUpInside)
return button
}
fileprivate func createNavigationBarBackItem(button: UIButton?) -> UIBarButtonItem? {
guard let button = button else {
return nil
}
let buttonItem = UIBarButtonItem(customView: button)
navigationItem.leftBarButtonItem = buttonItem
return buttonItem
}
fileprivate func createBlurView() -> UIView {
let height = controlView.bounds.height + bottomSafeArea
let imageFrame = CGRect(x: 0, y: view.frame.size.height - height, width: view.frame.width, height: height)
let image = view.makeScreenShotFromFrame(frame: imageFrame)
let screnShotImageView = UIImageView(image: image)
screnShotImageView.blurViewValue(value: 5)
screnShotImageView.frame = controlsViewContainer.bounds
screnShotImageView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
controlsViewContainer.insertSubview(screnShotImageView, at: 0)
addOverlay(toView: screnShotImageView)
return screnShotImageView
}
fileprivate func addOverlay(toView view: UIView) {
let overlayView = UIView(frame: view.bounds)
overlayView.backgroundColor = .black
overlayView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
overlayView.alpha = 0.4
view.addSubview(overlayView)
}
}
// MARK: animations
extension DemoDetailViewController {
fileprivate func showBackButtonDuration(duration: Double) {
backButton?.rotateDuration(duration: duration, from: -CGFloat.pi / 4, to: 0)
backButton?.scaleDuration(duration: duration, from: 0.5, to: 1)
backButton?.opacityDuration(duration: duration, from: 0, to: 1)
}
fileprivate func showControlViewDuration(duration: Double) {
moveUpControllerDuration(duration: duration)
showControlButtonsDuration(duration: duration)
showControlLabelDuration(duration: duration)
}
fileprivate func moveUpControllerDuration(duration: Double) {
controlBottomConstrant.constant = -controlsViewContainer.bounds.height
view.layoutIfNeeded()
controlBottomConstrant.constant = 0
UIView.animate(withDuration: duration, delay: 0, options: .curveEaseOut, animations: {
self.view.layoutIfNeeded()
}, completion: nil)
}
fileprivate func showControlButtonsDuration(duration: Double) {
[plusImageView, shareImageView, hertIconView].forEach {
$0?.rotateDuration(duration: duration, from: CGFloat.pi / 4, to: 0, delay: duration)
$0?.scaleDuration(duration: duration, from: 0.5, to: 1, delay: duration)
$0?.alpha = 0
$0?.opacityDuration(duration: duration, from: 0, to: 1, delay: duration, remove: false)
}
}
fileprivate func showControlLabelDuration(duration: Double) {
controlTextLabel.alpha = 0
controlTextLabel.opacityDuration(duration: duration, from: 0, to: 1, delay: duration, remove: false)
// move rigth
let offSet: CGFloat = 20
controlTextLableLending.constant -= offSet
view.layoutIfNeeded()
controlTextLableLending.constant += offSet
UIView.animate(withDuration: duration * 2, delay: 0, options: .curveEaseOut, animations: {
self.view.layoutIfNeeded()
}, completion: nil)
}
}
}
// MARK: actions
extension DemoDetailViewController {
func backButtonHandler() {
popViewcontroller()
}
}
@objc func backButtonHandler() {
popViewController()
}
}
@@ -24,40 +24,38 @@
import UIKit
public class DemoTableViewController: PTTableViewController {
private let items = ["1", "2", "3", "4", "5"] // image names
fileprivate let items = [("1", "River cruise"), ("2", "North Island"), ("3", "Mountain trail"), ("4", "Southern Coast"), ("5", "Fishing place")] // image names
}
// MARK: UITableViewDelegate
extension DemoTableViewController {
public override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 100
}
public override func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) {
guard let cell = cell as? ParallaxCell else {
return
public override func tableView(_: UITableView, numberOfRowsInSection _: Int) -> Int {
return 100
}
let index = indexPath.row % items.count
let imageName = items[index]
if let image = UIImage(named: imageName) {
cell.setImage(image, title: "Ramotion")
public override func tableView(_: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
guard let cell = cell as? ParallaxCell else { return }
let index = indexPath.row % items.count
let imageName = items[index].0
let title = items[index].1
if let image = UIImage(named: imageName) {
cell.setImage(image, title: title)
}
}
}
public override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell: ParallaxCell = tableView.getReusableCellWithIdentifier(indexPath)
return cell
}
public override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
let storyboard = UIStoryboard.storyboard(.Main)
let detaleViewController: DemoDetailViewController = storyboard.instantiateViewController()
pushViewController(detaleViewController)
}
}
public override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell: ParallaxCell = tableView.getReusableCellWithIdentifier(indexPath: indexPath)
return cell
}
public override func tableView(_: UITableView, didSelectRowAt _: IndexPath) {
let storyboard = UIStoryboard.storyboard(storyboard: .Main)
let detaleViewController: DemoDetailViewController = storyboard.instantiateViewController()
pushViewController(detaleViewController)
}
}
@@ -1,36 +0,0 @@
//
// PreviewTransitionDemoTests.swift
// PreviewTransitionDemoTests
//
// Created by Alex K. on 04/04/16.
// Copyright © 2016 Alex K. All rights reserved.
//
import XCTest
@testable import PreviewTransitionDemo
class PreviewTransitionDemoTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measureBlock {
// Put the code you want to measure the time of here.
}
}
}
@@ -0,0 +1,49 @@
//
// ScreenShot.swift
// PreviewTransitionDemo
//
// Created by Alex K. on 03/05/16.
// Copyright © 2016 Alex K. All rights reserved.
//
import UIKit
extension UIView {
func makeScreenShotFromFrame(frame: CGRect) -> UIImage? {
UIGraphicsBeginImageContextWithOptions(frame.size, false, 0.0)
let context = UIGraphicsGetCurrentContext()
context!.translateBy(x: frame.origin.x * -1, y: frame.origin.y * -1)
guard let currentContext = UIGraphicsGetCurrentContext() else {
return nil
}
layer.render(in: currentContext)
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
return image
}
}
extension UIImageView {
func blurViewValue(value: CGFloat) {
guard let image = self.image,
let blurfilter = CIFilter(name: "CIGaussianBlur"),
let imageToBlur = CIImage(image: image)
else {
return
}
blurfilter.setValue(value, forKey: kCIInputRadiusKey)
blurfilter.setValue(imageToBlur, forKey: "inputImage")
let resultImage = blurfilter.value(forKey: "outputImage") as! CIImage
var blurredImage = UIImage(ciImage: resultImage)
let cropped: CIImage = resultImage.cropped(to: CGRect(x: 0, y: 0, width: imageToBlur.extent.size.width, height: imageToBlur.extent.size.height))
blurredImage = UIImage(ciImage: cropped)
self.image = blurredImage
}
}
+165 -11
View File
@@ -1,26 +1,180 @@
# Preview-transision
<a href="https://www.ramotion.com/agency/app-development/?utm_source=gthb&utm_medium=repo&utm_campaign=preview-transition"><img src="https://github.com/Ramotion/folding-cell/blob/master/header.png"></a>
<a href="https://github.com/Ramotion/fpreview-transition">
<img align="left" src="https://github.com/Ramotion/preview-transition/blob/master/preview-transition.gif" width="480" height="360" /></a>
<p><h1 align="left">PREVIEW TRANSITION</h1></p>
<h4>Preview Transition is a simple preview gallery UI controller with animated tranisitions</h4>
___
<p><h6>We specialize in the designing and coding of custom UI for Mobile Apps and Websites.</h6>
<a href="https://www.ramotion.com/agency/app-development/?utm_source=gthb&utm_medium=repo&utm_campaign=preview-transition">
<img src="https://github.com/ramotion/gliding-collection/raw/master/contact_our_team@2x.png" width="187" height="34"></a>
</p>
<p><h6>Stay tuned for the latest updates:</h6>
<a href="https://goo.gl/rPFpid" >
<img src="https://i.imgur.com/ziSqeSo.png/" width="156" height="28"></a></p>
</br>
[![Twitter](https://img.shields.io/badge/Twitter-@Ramotion-blue.svg?style=flat)](http://twitter.com/Ramotion)
[![Travis](https://img.shields.io/travis/Ramotion/preview-transition.svg)](https://travis-ci.org/Ramotion/preview-transition.svg?branch=master)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Ramotion/preview-transition)
[![CocoaPods](https://img.shields.io/cocoapods/p/PreviewTransition.svg)](https://cocoapods.org/pods/PreviewTransition)
[![CocoaPods](https://img.shields.io/cocoapods/v/PreviewTransition.svg)](http://cocoapods.org/pods/PreviewTransition)
[![codebeat badge](https://codebeat.co/badges/b99f71fe-b7e7-4a08-94bd-d98307d176ea)](https://codebeat.co/projects/github-com-ramotion-preview-transition)
[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://paypal.me/Ramotion)
## About
This project is maintained by Ramotion, Inc.<br>
We specialize in the designing and coding of custom UI for Mobile Apps and Websites.<br>
**Looking for developers for your project?**<br>
This project is maintained by Ramotion, Inc. We specialize in the designing and coding of custom UI for Mobile Apps and Websites.
<a href="https://www.ramotion.com/agency/app-development/?utm_source=gthb&utm_medium=repo&utm_campaign=preview-transition">
<img src="https://github.com/ramotion/gliding-collection/raw/master/contact_our_team@2x.png" width="187" height="34"></a> <br>
## Requirements
- iOS 9.0+
- Xcode 7.3
- Xcode 9
## Licence
Preview-transision is released under the MIT license.
Preview-transition is released under the MIT license.
See [LICENSE](./LICENSE) for details.
Just add the Source folder to your project.
## Installation
or use [CocoaPods](https://cocoapods.org) with Podfile:
Just add the Source folder to your project or use [CocoaPods](https://cocoapods.org) like this:
``` ruby
pod 'PreviewTransition', '~> 0.0.1'
pod "PreviewTransition"
```
## About
The project maintained by [app development agency](https://ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=preview-transision) [Ramotion Inc.](https://ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=preview-transision)
See our other [open-source projects](https://github.com/ramotion) or [hire](https://ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=preview-transision) us to design, develop, and grow your product.
or [Carthage](https://github.com/Carthage/Carthage) users can simply add to their `Cartfile`:
```
github "Ramotion/preview-transition"
[![Twitter URL](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=https://github.com/ramotion/preview-transision)
[![Twitter Follow](https://img.shields.io/twitter/follow/ramotion.svg?style=social)](https://twitter.com/ramotion)
```
## Usage
1) ``` import PreviewTransition ```
2) Create UITableViewController inherit, inheriting from ```PTTableViewController```
3) Add UITableViewDelegate methods
```swift
public override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return <RowsCount>
}
public override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
return tableView.dequeueReusableCellWithIdentifier(<CellIdentifier>, forIndexPath: indexPath)
}
```
4) add a ParallaxCell
storyboards:
create a cell and inherit from ```ParallaxCell```; don't forget set the identifier ```<CellIdentifier>```
or programmatically:
register a cell in viewDidLoad ```tableView.registerClass(ParallaxCell, forCellReuseIdentifier:<CellIdentifier>)```
5) set cell height
6) create image names (image sizes must be equal to screen size or bigger)
```swift
let images = [image_name, image_name, image_name, image_name, image_name] // image names
```
7) set image and text for ParallaxCell
```swift
public override func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) {
guard let cell = cell as? ParallaxCell else {
return
}
let imageName = images[indexPath.row]
if let image = UIImage(named: imageName) {
cell.setImage(image, title: <SetText>)
}
}
```
your tableViewController should look like [DemoTableViewController](https://github.com/Ramotion/preview-transition/blob/master/PreviewTransitionDemo/PreviewTransitionDemo/ViewController/DemoTableViewController.swift)
Method ```public override func tableView(tableView: didSelectRowAtIndexPath indexPath:)``` we will add later. (step 10)
8) Create UIViewController, inheriting from ```PTDetailViewController```
9) Add action for backButton and call ```popViewController()```
```swift
func backButtonHandler() {
popViewController()
}
```
10) Push this UIViewController in UITableViewController. Add method
```swift
public override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
// create viewController
let <YourViewController> = storyboard?.instantiateViewControllerWithIdentifier(<identifier>)
if case let viewController as <YourViewController> = viewController {
pushViewController(viewController)
}
}
```
11) Configure UINavigationBar
```swift
// transparent background
UINavigationBar.appearance().setBackgroundImage(UIImage(), forBarMetrics: .Default)
UINavigationBar.appearance().shadowImage = UIImage()
UINavigationBar.appearance().translucent = true
UINavigationBar.appearance().tintColor = .whiteColor()
// set font
if let font = UIFont(name: <Font name> , size: 18) {
UINavigationBar.appearance().titleTextAttributes = [
NSForegroundColorAttributeName : UIColor.whiteColor(),
NSFontAttributeName : font
]
}
```
## 📄 License
Preview Transition is released under the MIT license.
See [LICENSE](./LICENSE) for details.
This library is a part of a <a href="https://github.com/Ramotion/swift-ui-animation-components-and-libraries"><b>selection of our best UI open-source projects.</b></a>
If you use the open-source library in your project, please make sure to credit and backlink to https://www.ramotion.com/
## 📱 Get the Showroom App for iOS to give it a try
Try this UI component and more like this in our iOS app. Contact us if interested.
<a href="https://itunes.apple.com/app/apple-store/id1182360240?pt=550053&ct=preview-transition&mt=8" >
<img src="https://github.com/ramotion/gliding-collection/raw/master/app_store@2x.png" width="117" height="34"></a>
<a href="https://www.ramotion.com/agency/app-development/?utm_source=gthb&utm_medium=repo&utm_campaign=preview-transition">
<img src="https://github.com/ramotion/gliding-collection/raw/master/contact_our_team@2x.png" width="187" height="34"></a>
<br>
<br>
+159
View File
@@ -0,0 +1,159 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Classes Reference</title>
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
<meta charset='utf-8'>
<script src="js/jquery.min.js" defer></script>
<script src="js/jazzy.js" defer></script>
</head>
<body>
<a title="Classes Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="index.html">PreviewTransitionDemo Docs</a> (82% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="index.html">PreviewTransitionDemo Reference</a>
<img id="carat" src="img/carat.png" />
Classes Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Classes/PTDetailViewController.html">PTDetailViewController</a>
</li>
<li class="nav-group-task">
<a href="Classes/PTTableViewController.html">PTTableViewController</a>
</li>
<li class="nav-group-task">
<a href="Classes/ParallaxCell.html">ParallaxCell</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>Classes</h1>
<p>The following classes are available globally.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:C21PreviewTransitionDemo22PTDetailViewController"></a>
<a name="//apple_ref/swift/Class/PTDetailViewController" class="dashAnchor"></a>
<a class="token" href="#/s:C21PreviewTransitionDemo22PTDetailViewController">PTDetailViewController</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Base UIViewController for preview transition</p>
<a href="Classes/PTDetailViewController.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">PTDetailViewController</span><span class="p">:</span> <span class="kt">UIViewController</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:C21PreviewTransitionDemo12ParallaxCell"></a>
<a name="//apple_ref/swift/Class/ParallaxCell" class="dashAnchor"></a>
<a class="token" href="#/s:C21PreviewTransitionDemo12ParallaxCell">ParallaxCell</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>UITableViewCell with parallax background</p>
<a href="Classes/ParallaxCell.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">ParallaxCell</span><span class="p">:</span> <span class="kt">UITableViewCell</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:C21PreviewTransitionDemo21PTTableViewController"></a>
<a name="//apple_ref/swift/Class/PTTableViewController" class="dashAnchor"></a>
<a class="token" href="#/s:C21PreviewTransitionDemo21PTTableViewController">PTTableViewController</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Base UITableViewController for preview transition</p>
<a href="Classes/PTTableViewController.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">PTTableViewController</span><span class="p">:</span> <span class="kt">UITableViewController</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2016 <a class="link" href="" target="_blank" rel="external">AlexKalinkin</a>. All rights reserved. (Last updated: 2016-06-10)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
+101
View File
@@ -0,0 +1,101 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>PTDetailViewController Class Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Class/PTDetailViewController" class="dashAnchor"></a>
<a title="PTDetailViewController Class Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">PreviewTransitionDemo Docs</a> (82% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">PreviewTransitionDemo Reference</a>
<img id="carat" src="../img/carat.png" />
PTDetailViewController Class Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/PTDetailViewController.html">PTDetailViewController</a>
</li>
<li class="nav-group-task">
<a href="../Classes/PTTableViewController.html">PTTableViewController</a>
</li>
<li class="nav-group-task">
<a href="../Classes/ParallaxCell.html">ParallaxCell</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>PTDetailViewController</h1>
<div class="declaration">
<div class="language">
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">PTDetailViewController</span><span class="p">:</span> <span class="kt">UIViewController</span></code></pre>
</div>
</div>
<p>Base UIViewController for preview transition</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:FC21PreviewTransitionDemo22PTDetailViewController17popViewControllerFT_T_"></a>
<a name="//apple_ref/swift/Method/popViewController()" class="dashAnchor"></a>
<a class="token" href="#/s:FC21PreviewTransitionDemo22PTDetailViewController17popViewControllerFT_T_">popViewController()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Pops the top view controller from the navigation stack and updates the display with custom animation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">popViewController</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2016 <a class="link" href="" target="_blank" rel="external">AlexKalinkin</a>. All rights reserved. (Last updated: 2016-06-10)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
+121
View File
@@ -0,0 +1,121 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>PTTableViewController Class Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Class/PTTableViewController" class="dashAnchor"></a>
<a title="PTTableViewController Class Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">PreviewTransitionDemo Docs</a> (82% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">PreviewTransitionDemo Reference</a>
<img id="carat" src="../img/carat.png" />
PTTableViewController Class Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/PTDetailViewController.html">PTDetailViewController</a>
</li>
<li class="nav-group-task">
<a href="../Classes/PTTableViewController.html">PTTableViewController</a>
</li>
<li class="nav-group-task">
<a href="../Classes/ParallaxCell.html">ParallaxCell</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>PTTableViewController</h1>
<div class="declaration">
<div class="language">
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">PTTableViewController</span><span class="p">:</span> <span class="kt">UITableViewController</span></code></pre>
</div>
</div>
<p>Base UITableViewController for preview transition</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:FC21PreviewTransitionDemo21PTTableViewController18pushViewControllerFCS_22PTDetailViewControllerT_"></a>
<a name="//apple_ref/swift/Method/pushViewController(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:FC21PreviewTransitionDemo21PTTableViewController18pushViewControllerFCS_22PTDetailViewControllerT_">pushViewController(_:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Pushes a view controller onto the receivers stack and updates the display whith custom animation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">pushViewController</span><span class="p">(</span><span class="nv">viewController</span><span class="p">:</span> <span class="kt">PTDetailViewController</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>viewController</em>
</code>
</td>
<td>
<div>
<p>The view controller to push onto the stack.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2016 <a class="link" href="" target="_blank" rel="external">AlexKalinkin</a>. All rights reserved. (Last updated: 2016-06-10)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
+298
View File
@@ -0,0 +1,298 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>ParallaxCell Class Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Class/ParallaxCell" class="dashAnchor"></a>
<a title="ParallaxCell Class Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">PreviewTransitionDemo Docs</a> (82% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">PreviewTransitionDemo Reference</a>
<img id="carat" src="../img/carat.png" />
ParallaxCell Class Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/PTDetailViewController.html">PTDetailViewController</a>
</li>
<li class="nav-group-task">
<a href="../Classes/PTTableViewController.html">PTTableViewController</a>
</li>
<li class="nav-group-task">
<a href="../Classes/ParallaxCell.html">ParallaxCell</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>ParallaxCell</h1>
<div class="declaration">
<div class="language">
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">ParallaxCell</span><span class="p">:</span> <span class="kt">UITableViewCell</span></code></pre>
</div>
</div>
<p>UITableViewCell with parallax background</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:vC21PreviewTransitionDemo12ParallaxCell13separatorViewGSqCSo6UIView_"></a>
<a name="//apple_ref/swift/Property/separatorView" class="dashAnchor"></a>
<a class="token" href="#/s:vC21PreviewTransitionDemo12ParallaxCell13separatorViewGSqCSo6UIView_">separatorView</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Custom separator view</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">separatorView</span><span class="p">:</span> <span class="kt">UIView</span><span class="p">?</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:vC21PreviewTransitionDemo12ParallaxCell10differenceV12CoreGraphics7CGFloat"></a>
<a name="//apple_ref/swift/Property/difference" class="dashAnchor"></a>
<a class="token" href="#/s:vC21PreviewTransitionDemo12ParallaxCell10differenceV12CoreGraphics7CGFloat">difference</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>parallax offset</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">@IBInspectable</span> <span class="kd">public</span> <span class="k">var</span> <span class="nv">difference</span><span class="p">:</span> <span class="kt">CGFloat</span> <span class="o">=</span> <span class="mi">100</span> <span class="c1">// image parallax</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:vC21PreviewTransitionDemo12ParallaxCell15foregroundColorCSo7UIColor"></a>
<a name="//apple_ref/swift/Property/foregroundColor" class="dashAnchor"></a>
<a class="token" href="#/s:vC21PreviewTransitionDemo12ParallaxCell15foregroundColorCSo7UIColor">foregroundColor</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The foreground views background color.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">@IBInspectable</span> <span class="kd">public</span> <span class="k">var</span> <span class="nv">foregroundColor</span> <span class="o">=</span> <span class="kt">UIColor</span><span class="o">.</span><span class="nf">blackColor</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:vC21PreviewTransitionDemo12ParallaxCell15foregroundAlphaV12CoreGraphics7CGFloat"></a>
<a name="//apple_ref/swift/Property/foregroundAlpha" class="dashAnchor"></a>
<a class="token" href="#/s:vC21PreviewTransitionDemo12ParallaxCell15foregroundAlphaV12CoreGraphics7CGFloat">foregroundAlpha</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The foreground views alpha.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">@IBInspectable</span> <span class="kd">public</span> <span class="k">var</span> <span class="nv">foregroundAlpha</span><span class="p">:</span> <span class="kt">CGFloat</span> <span class="o">=</span> <span class="mf">0.5</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:FC21PreviewTransitionDemo12ParallaxCellcFT5coderCSo7NSCoder_GSqS0__"></a>
<a name="//apple_ref/swift/Method/init(coder:)" class="dashAnchor"></a>
<a class="token" href="#/s:FC21PreviewTransitionDemo12ParallaxCellcFT5coderCSo7NSCoder_GSqS0__">init(coder:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Initializes a view from data in a given unarchiver.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">required</span> <span class="nf">init</span><span class="p">?(</span><span class="n">coder</span> <span class="nv">aDecoder</span><span class="p">:</span> <span class="kt">NSCoder</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>aDecoder</em>
</code>
</td>
<td>
<div>
<p>An unarchiver object.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An initialized UITableViewCell object.</p>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:FC21PreviewTransitionDemo12ParallaxCell8setImageFTCSo7UIImage5titleSS_T_"></a>
<a name="//apple_ref/swift/Method/setImage(_:title:)" class="dashAnchor"></a>
<a class="token" href="#/s:FC21PreviewTransitionDemo12ParallaxCell8setImageFTCSo7UIImage5titleSS_T_">setImage(_:title:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Sets the contents of the background image and title label</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">setImage</span><span class="p">(</span><span class="nv">image</span><span class="p">:</span> <span class="kt">UIImage</span><span class="p">,</span> <span class="nv">title</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>image</em>
</code>
</td>
<td>
<div>
<p>The image object which set to the backgroundImageView</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>title</em>
</code>
</td>
<td>
<div>
<p>The text to be displayed in the Cell</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2016 <a class="link" href="" target="_blank" rel="external">AlexKalinkin</a>. All rights reserved. (Last updated: 2016-06-10)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
+200
View File
@@ -0,0 +1,200 @@
/* Credit to https://gist.github.com/wataru420/2048287 */
.highlight {
/* Comment */
/* Error */
/* Keyword */
/* Operator */
/* Comment.Multiline */
/* Comment.Preproc */
/* Comment.Single */
/* Comment.Special */
/* Generic.Deleted */
/* Generic.Deleted.Specific */
/* Generic.Emph */
/* Generic.Error */
/* Generic.Heading */
/* Generic.Inserted */
/* Generic.Inserted.Specific */
/* Generic.Output */
/* Generic.Prompt */
/* Generic.Strong */
/* Generic.Subheading */
/* Generic.Traceback */
/* Keyword.Constant */
/* Keyword.Declaration */
/* Keyword.Pseudo */
/* Keyword.Reserved */
/* Keyword.Type */
/* Literal.Number */
/* Literal.String */
/* Name.Attribute */
/* Name.Builtin */
/* Name.Class */
/* Name.Constant */
/* Name.Entity */
/* Name.Exception */
/* Name.Function */
/* Name.Namespace */
/* Name.Tag */
/* Name.Variable */
/* Operator.Word */
/* Text.Whitespace */
/* Literal.Number.Float */
/* Literal.Number.Hex */
/* Literal.Number.Integer */
/* Literal.Number.Oct */
/* Literal.String.Backtick */
/* Literal.String.Char */
/* Literal.String.Doc */
/* Literal.String.Double */
/* Literal.String.Escape */
/* Literal.String.Heredoc */
/* Literal.String.Interpol */
/* Literal.String.Other */
/* Literal.String.Regex */
/* Literal.String.Single */
/* Literal.String.Symbol */
/* Name.Builtin.Pseudo */
/* Name.Variable.Class */
/* Name.Variable.Global */
/* Name.Variable.Instance */
/* Literal.Number.Integer.Long */ }
.highlight .c {
color: #999988;
font-style: italic; }
.highlight .err {
color: #a61717;
background-color: #e3d2d2; }
.highlight .k {
color: #000000;
font-weight: bold; }
.highlight .o {
color: #000000;
font-weight: bold; }
.highlight .cm {
color: #999988;
font-style: italic; }
.highlight .cp {
color: #999999;
font-weight: bold; }
.highlight .c1 {
color: #999988;
font-style: italic; }
.highlight .cs {
color: #999999;
font-weight: bold;
font-style: italic; }
.highlight .gd {
color: #000000;
background-color: #ffdddd; }
.highlight .gd .x {
color: #000000;
background-color: #ffaaaa; }
.highlight .ge {
color: #000000;
font-style: italic; }
.highlight .gr {
color: #aa0000; }
.highlight .gh {
color: #999999; }
.highlight .gi {
color: #000000;
background-color: #ddffdd; }
.highlight .gi .x {
color: #000000;
background-color: #aaffaa; }
.highlight .go {
color: #888888; }
.highlight .gp {
color: #555555; }
.highlight .gs {
font-weight: bold; }
.highlight .gu {
color: #aaaaaa; }
.highlight .gt {
color: #aa0000; }
.highlight .kc {
color: #000000;
font-weight: bold; }
.highlight .kd {
color: #000000;
font-weight: bold; }
.highlight .kp {
color: #000000;
font-weight: bold; }
.highlight .kr {
color: #000000;
font-weight: bold; }
.highlight .kt {
color: #445588; }
.highlight .m {
color: #009999; }
.highlight .s {
color: #d14; }
.highlight .na {
color: #008080; }
.highlight .nb {
color: #0086B3; }
.highlight .nc {
color: #445588;
font-weight: bold; }
.highlight .no {
color: #008080; }
.highlight .ni {
color: #800080; }
.highlight .ne {
color: #990000;
font-weight: bold; }
.highlight .nf {
color: #990000; }
.highlight .nn {
color: #555555; }
.highlight .nt {
color: #000080; }
.highlight .nv {
color: #008080; }
.highlight .ow {
color: #000000;
font-weight: bold; }
.highlight .w {
color: #bbbbbb; }
.highlight .mf {
color: #009999; }
.highlight .mh {
color: #009999; }
.highlight .mi {
color: #009999; }
.highlight .mo {
color: #009999; }
.highlight .sb {
color: #d14; }
.highlight .sc {
color: #d14; }
.highlight .sd {
color: #d14; }
.highlight .s2 {
color: #d14; }
.highlight .se {
color: #d14; }
.highlight .sh {
color: #d14; }
.highlight .si {
color: #d14; }
.highlight .sx {
color: #d14; }
.highlight .sr {
color: #009926; }
.highlight .s1 {
color: #d14; }
.highlight .ss {
color: #990073; }
.highlight .bp {
color: #999999; }
.highlight .vc {
color: #008080; }
.highlight .vg {
color: #008080; }
.highlight .vi {
color: #008080; }
.highlight .il {
color: #009999; }
+331
View File
@@ -0,0 +1,331 @@
html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td {
background: transparent;
border: 0;
margin: 0;
outline: 0;
padding: 0;
vertical-align: baseline; }
body {
background-color: #f2f2f2;
font-family: Helvetica, freesans, Arial, sans-serif;
font-size: 14px;
-webkit-font-smoothing: subpixel-antialiased;
word-wrap: break-word; }
h1, h2, h3 {
margin-top: 0.8em;
margin-bottom: 0.3em;
font-weight: 100;
color: black; }
h1 {
font-size: 2.5em; }
h2 {
font-size: 2em;
border-bottom: 1px solid #e2e2e2; }
h4 {
font-size: 13px;
line-height: 1.5;
margin-top: 21px; }
h5 {
font-size: 1.1em; }
h6 {
font-size: 1.1em;
color: #777; }
.section-name {
color: gray;
display: block;
font-family: Helvetica;
font-size: 22px;
font-weight: 100;
margin-bottom: 15px; }
pre, code {
font: 0.95em Menlo, monospace;
color: #777;
word-wrap: normal; }
p code, li code {
background-color: #eee;
padding: 2px 4px;
border-radius: 4px; }
a {
color: #0088cc;
text-decoration: none; }
ul {
padding-left: 15px; }
li {
line-height: 1.8em; }
img {
max-width: 100%; }
blockquote {
margin-left: 0;
padding: 0 10px;
border-left: 4px solid #ccc; }
.content-wrapper {
margin: 0 auto;
width: 980px; }
header {
font-size: 0.85em;
line-height: 26px;
background-color: #414141;
position: fixed;
width: 100%;
z-index: 1; }
header img {
padding-right: 6px;
vertical-align: -4px;
height: 16px; }
header a {
color: #fff; }
header p {
float: left;
color: #999; }
header .header-right {
float: right;
margin-left: 16px; }
#breadcrumbs {
background-color: #f2f2f2;
height: 27px;
padding-top: 17px;
position: fixed;
width: 100%;
z-index: 1;
margin-top: 26px; }
#breadcrumbs #carat {
height: 10px;
margin: 0 5px; }
.sidebar {
background-color: #f9f9f9;
border: 1px solid #e2e2e2;
overflow-y: auto;
overflow-x: hidden;
position: fixed;
top: 70px;
bottom: 0;
width: 230px;
word-wrap: normal; }
.nav-groups {
list-style-type: none;
background: #fff;
padding-left: 0; }
.nav-group-name {
border-bottom: 1px solid #e2e2e2;
font-size: 1.1em;
font-weight: 100;
padding: 15px 0 15px 20px; }
.nav-group-name > a {
color: #333; }
.nav-group-tasks {
margin-top: 5px; }
.nav-group-task {
font-size: 0.9em;
list-style-type: none; }
.nav-group-task a {
color: #888; }
.main-content {
background-color: #fff;
border: 1px solid #e2e2e2;
margin-left: 246px;
position: absolute;
overflow: hidden;
padding-bottom: 60px;
top: 70px;
width: 734px; }
.main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote {
margin-bottom: 1em; }
.main-content p {
line-height: 1.8em; }
.main-content section .section:first-child {
margin-top: 0;
padding-top: 0; }
.main-content section .task-group-section .task-group:first-of-type {
padding-top: 10px; }
.main-content section .task-group-section .task-group:first-of-type .section-name {
padding-top: 15px; }
.section {
padding: 0 25px; }
.highlight {
background-color: #eee;
padding: 10px 12px;
border: 1px solid #e2e2e2;
border-radius: 4px;
overflow-x: auto; }
.declaration .highlight {
overflow-x: initial;
padding: 0 40px 40px 0;
margin-bottom: -25px;
background-color: transparent;
border: none; }
.section-name {
margin: 0;
margin-left: 18px; }
.task-group-section {
padding-left: 6px;
border-top: 1px solid #e2e2e2; }
.task-group {
padding-top: 0px; }
.task-name-container a[name]:before {
content: "";
display: block;
padding-top: 70px;
margin: -70px 0 0; }
.item {
padding-top: 8px;
width: 100%;
list-style-type: none; }
.item a[name]:before {
content: "";
display: block;
padding-top: 70px;
margin: -70px 0 0; }
.item code {
background-color: transparent;
padding: 0; }
.item .token {
padding-left: 3px;
margin-left: 15px;
font-size: 11.9px; }
.item .declaration-note {
font-size: .85em;
color: gray;
font-style: italic; }
.pointer-container {
border-bottom: 1px solid #e2e2e2;
left: -23px;
padding-bottom: 13px;
position: relative;
width: 110%; }
.pointer {
background: #f9f9f9;
border-left: 1px solid #e2e2e2;
border-top: 1px solid #e2e2e2;
height: 12px;
left: 21px;
top: -7px;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
position: absolute;
width: 12px; }
.height-container {
display: none;
left: -25px;
padding: 0 25px;
position: relative;
width: 100%;
overflow: hidden; }
.height-container .section {
background: #f9f9f9;
border-bottom: 1px solid #e2e2e2;
left: -25px;
position: relative;
width: 100%;
padding-top: 10px;
padding-bottom: 5px; }
.aside, .language {
padding: 6px 12px;
margin: 12px 0;
border-left: 5px solid #dddddd;
overflow-y: hidden; }
.aside .aside-title, .language .aside-title {
font-size: 9px;
letter-spacing: 2px;
text-transform: uppercase;
padding-bottom: 0;
margin: 0;
color: #aaa;
-webkit-user-select: none; }
.aside p:last-child, .language p:last-child {
margin-bottom: 0; }
.language {
border-left: 5px solid #cde9f4; }
.language .aside-title {
color: #4b8afb; }
.aside-warning {
border-left: 5px solid #ff6666; }
.aside-warning .aside-title {
color: #ff0000; }
.graybox {
border-collapse: collapse;
width: 100%; }
.graybox p {
margin: 0;
word-break: break-word;
min-width: 50px; }
.graybox td {
border: 1px solid #e2e2e2;
padding: 5px 25px 5px 10px;
vertical-align: middle; }
.graybox tr td:first-of-type {
text-align: right;
padding: 7px;
vertical-align: top;
word-break: normal;
width: 40px; }
.slightly-smaller {
font-size: 0.9em; }
#footer {
position: absolute;
bottom: 10px;
margin-left: 25px; }
#footer p {
margin: 0;
color: #aaa;
font-size: 0.8em; }
html.dash header, html.dash #breadcrumbs, html.dash .sidebar {
display: none; }
html.dash .main-content {
width: 980px;
margin-left: 0;
border: none;
width: 100%;
top: 0;
padding-bottom: 0; }
html.dash .height-container {
display: block; }
html.dash .item .token {
margin-left: 0; }
html.dash .content-wrapper {
width: auto; }
html.dash #footer {
position: static; }
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>com.jazzy.previewtransitiondemo</string>
<key>CFBundleName</key>
<string>PreviewTransitionDemo</string>
<key>DocSetPlatformFamily</key>
<string>jazzy</string>
<key>isDashDocset</key>
<true/>
<key>dashIndexFilePath</key>
<string>index.html</string>
<key>isJavaScriptEnabled</key>
<true/>
<key>DashDocSetFamily</key>
<string>dashtoc</string>
</dict>
</plist>
@@ -0,0 +1,159 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Classes Reference</title>
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
<meta charset='utf-8'>
<script src="js/jquery.min.js" defer></script>
<script src="js/jazzy.js" defer></script>
</head>
<body>
<a title="Classes Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="index.html">PreviewTransitionDemo Docs</a> (82% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="index.html">PreviewTransitionDemo Reference</a>
<img id="carat" src="img/carat.png" />
Classes Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Classes/PTDetailViewController.html">PTDetailViewController</a>
</li>
<li class="nav-group-task">
<a href="Classes/PTTableViewController.html">PTTableViewController</a>
</li>
<li class="nav-group-task">
<a href="Classes/ParallaxCell.html">ParallaxCell</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>Classes</h1>
<p>The following classes are available globally.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:C21PreviewTransitionDemo22PTDetailViewController"></a>
<a name="//apple_ref/swift/Class/PTDetailViewController" class="dashAnchor"></a>
<a class="token" href="#/s:C21PreviewTransitionDemo22PTDetailViewController">PTDetailViewController</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Base UIViewController for preview transition</p>
<a href="Classes/PTDetailViewController.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">PTDetailViewController</span><span class="p">:</span> <span class="kt">UIViewController</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:C21PreviewTransitionDemo12ParallaxCell"></a>
<a name="//apple_ref/swift/Class/ParallaxCell" class="dashAnchor"></a>
<a class="token" href="#/s:C21PreviewTransitionDemo12ParallaxCell">ParallaxCell</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>UITableViewCell with parallax background</p>
<a href="Classes/ParallaxCell.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">ParallaxCell</span><span class="p">:</span> <span class="kt">UITableViewCell</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:C21PreviewTransitionDemo21PTTableViewController"></a>
<a name="//apple_ref/swift/Class/PTTableViewController" class="dashAnchor"></a>
<a class="token" href="#/s:C21PreviewTransitionDemo21PTTableViewController">PTTableViewController</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Base UITableViewController for preview transition</p>
<a href="Classes/PTTableViewController.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">PTTableViewController</span><span class="p">:</span> <span class="kt">UITableViewController</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2016 <a class="link" href="" target="_blank" rel="external">AlexKalinkin</a>. All rights reserved. (Last updated: 2016-06-10)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
@@ -0,0 +1,101 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>PTDetailViewController Class Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Class/PTDetailViewController" class="dashAnchor"></a>
<a title="PTDetailViewController Class Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">PreviewTransitionDemo Docs</a> (82% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">PreviewTransitionDemo Reference</a>
<img id="carat" src="../img/carat.png" />
PTDetailViewController Class Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/PTDetailViewController.html">PTDetailViewController</a>
</li>
<li class="nav-group-task">
<a href="../Classes/PTTableViewController.html">PTTableViewController</a>
</li>
<li class="nav-group-task">
<a href="../Classes/ParallaxCell.html">ParallaxCell</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>PTDetailViewController</h1>
<div class="declaration">
<div class="language">
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">PTDetailViewController</span><span class="p">:</span> <span class="kt">UIViewController</span></code></pre>
</div>
</div>
<p>Base UIViewController for preview transition</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:FC21PreviewTransitionDemo22PTDetailViewController17popViewControllerFT_T_"></a>
<a name="//apple_ref/swift/Method/popViewController()" class="dashAnchor"></a>
<a class="token" href="#/s:FC21PreviewTransitionDemo22PTDetailViewController17popViewControllerFT_T_">popViewController()</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Pops the top view controller from the navigation stack and updates the display with custom animation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">popViewController</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2016 <a class="link" href="" target="_blank" rel="external">AlexKalinkin</a>. All rights reserved. (Last updated: 2016-06-10)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
@@ -0,0 +1,121 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>PTTableViewController Class Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Class/PTTableViewController" class="dashAnchor"></a>
<a title="PTTableViewController Class Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">PreviewTransitionDemo Docs</a> (82% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">PreviewTransitionDemo Reference</a>
<img id="carat" src="../img/carat.png" />
PTTableViewController Class Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/PTDetailViewController.html">PTDetailViewController</a>
</li>
<li class="nav-group-task">
<a href="../Classes/PTTableViewController.html">PTTableViewController</a>
</li>
<li class="nav-group-task">
<a href="../Classes/ParallaxCell.html">ParallaxCell</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>PTTableViewController</h1>
<div class="declaration">
<div class="language">
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">PTTableViewController</span><span class="p">:</span> <span class="kt">UITableViewController</span></code></pre>
</div>
</div>
<p>Base UITableViewController for preview transition</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:FC21PreviewTransitionDemo21PTTableViewController18pushViewControllerFCS_22PTDetailViewControllerT_"></a>
<a name="//apple_ref/swift/Method/pushViewController(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:FC21PreviewTransitionDemo21PTTableViewController18pushViewControllerFCS_22PTDetailViewControllerT_">pushViewController(_:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Pushes a view controller onto the receivers stack and updates the display whith custom animation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">pushViewController</span><span class="p">(</span><span class="nv">viewController</span><span class="p">:</span> <span class="kt">PTDetailViewController</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>viewController</em>
</code>
</td>
<td>
<div>
<p>The view controller to push onto the stack.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2016 <a class="link" href="" target="_blank" rel="external">AlexKalinkin</a>. All rights reserved. (Last updated: 2016-06-10)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
@@ -0,0 +1,298 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>ParallaxCell Class Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/swift/Class/ParallaxCell" class="dashAnchor"></a>
<a title="ParallaxCell Class Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">PreviewTransitionDemo Docs</a> (82% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">PreviewTransitionDemo Reference</a>
<img id="carat" src="../img/carat.png" />
ParallaxCell Class Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/PTDetailViewController.html">PTDetailViewController</a>
</li>
<li class="nav-group-task">
<a href="../Classes/PTTableViewController.html">PTTableViewController</a>
</li>
<li class="nav-group-task">
<a href="../Classes/ParallaxCell.html">ParallaxCell</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>ParallaxCell</h1>
<div class="declaration">
<div class="language">
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">ParallaxCell</span><span class="p">:</span> <span class="kt">UITableViewCell</span></code></pre>
</div>
</div>
<p>UITableViewCell with parallax background</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:vC21PreviewTransitionDemo12ParallaxCell13separatorViewGSqCSo6UIView_"></a>
<a name="//apple_ref/swift/Property/separatorView" class="dashAnchor"></a>
<a class="token" href="#/s:vC21PreviewTransitionDemo12ParallaxCell13separatorViewGSqCSo6UIView_">separatorView</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Custom separator view</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">separatorView</span><span class="p">:</span> <span class="kt">UIView</span><span class="p">?</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:vC21PreviewTransitionDemo12ParallaxCell10differenceV12CoreGraphics7CGFloat"></a>
<a name="//apple_ref/swift/Property/difference" class="dashAnchor"></a>
<a class="token" href="#/s:vC21PreviewTransitionDemo12ParallaxCell10differenceV12CoreGraphics7CGFloat">difference</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>parallax offset</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">@IBInspectable</span> <span class="kd">public</span> <span class="k">var</span> <span class="nv">difference</span><span class="p">:</span> <span class="kt">CGFloat</span> <span class="o">=</span> <span class="mi">100</span> <span class="c1">// image parallax</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:vC21PreviewTransitionDemo12ParallaxCell15foregroundColorCSo7UIColor"></a>
<a name="//apple_ref/swift/Property/foregroundColor" class="dashAnchor"></a>
<a class="token" href="#/s:vC21PreviewTransitionDemo12ParallaxCell15foregroundColorCSo7UIColor">foregroundColor</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The foreground views background color.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">@IBInspectable</span> <span class="kd">public</span> <span class="k">var</span> <span class="nv">foregroundColor</span> <span class="o">=</span> <span class="kt">UIColor</span><span class="o">.</span><span class="nf">blackColor</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:vC21PreviewTransitionDemo12ParallaxCell15foregroundAlphaV12CoreGraphics7CGFloat"></a>
<a name="//apple_ref/swift/Property/foregroundAlpha" class="dashAnchor"></a>
<a class="token" href="#/s:vC21PreviewTransitionDemo12ParallaxCell15foregroundAlphaV12CoreGraphics7CGFloat">foregroundAlpha</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The foreground views alpha.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">@IBInspectable</span> <span class="kd">public</span> <span class="k">var</span> <span class="nv">foregroundAlpha</span><span class="p">:</span> <span class="kt">CGFloat</span> <span class="o">=</span> <span class="mf">0.5</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:FC21PreviewTransitionDemo12ParallaxCellcFT5coderCSo7NSCoder_GSqS0__"></a>
<a name="//apple_ref/swift/Method/init(coder:)" class="dashAnchor"></a>
<a class="token" href="#/s:FC21PreviewTransitionDemo12ParallaxCellcFT5coderCSo7NSCoder_GSqS0__">init(coder:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Initializes a view from data in a given unarchiver.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">required</span> <span class="nf">init</span><span class="p">?(</span><span class="n">coder</span> <span class="nv">aDecoder</span><span class="p">:</span> <span class="kt">NSCoder</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>aDecoder</em>
</code>
</td>
<td>
<div>
<p>An unarchiver object.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An initialized UITableViewCell object.</p>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:FC21PreviewTransitionDemo12ParallaxCell8setImageFTCSo7UIImage5titleSS_T_"></a>
<a name="//apple_ref/swift/Method/setImage(_:title:)" class="dashAnchor"></a>
<a class="token" href="#/s:FC21PreviewTransitionDemo12ParallaxCell8setImageFTCSo7UIImage5titleSS_T_">setImage(_:title:)</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Sets the contents of the background image and title label</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">setImage</span><span class="p">(</span><span class="nv">image</span><span class="p">:</span> <span class="kt">UIImage</span><span class="p">,</span> <span class="nv">title</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>image</em>
</code>
</td>
<td>
<div>
<p>The image object which set to the backgroundImageView</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>title</em>
</code>
</td>
<td>
<div>
<p>The text to be displayed in the Cell</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2016 <a class="link" href="" target="_blank" rel="external">AlexKalinkin</a>. All rights reserved. (Last updated: 2016-06-10)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
@@ -0,0 +1,200 @@
/* Credit to https://gist.github.com/wataru420/2048287 */
.highlight {
/* Comment */
/* Error */
/* Keyword */
/* Operator */
/* Comment.Multiline */
/* Comment.Preproc */
/* Comment.Single */
/* Comment.Special */
/* Generic.Deleted */
/* Generic.Deleted.Specific */
/* Generic.Emph */
/* Generic.Error */
/* Generic.Heading */
/* Generic.Inserted */
/* Generic.Inserted.Specific */
/* Generic.Output */
/* Generic.Prompt */
/* Generic.Strong */
/* Generic.Subheading */
/* Generic.Traceback */
/* Keyword.Constant */
/* Keyword.Declaration */
/* Keyword.Pseudo */
/* Keyword.Reserved */
/* Keyword.Type */
/* Literal.Number */
/* Literal.String */
/* Name.Attribute */
/* Name.Builtin */
/* Name.Class */
/* Name.Constant */
/* Name.Entity */
/* Name.Exception */
/* Name.Function */
/* Name.Namespace */
/* Name.Tag */
/* Name.Variable */
/* Operator.Word */
/* Text.Whitespace */
/* Literal.Number.Float */
/* Literal.Number.Hex */
/* Literal.Number.Integer */
/* Literal.Number.Oct */
/* Literal.String.Backtick */
/* Literal.String.Char */
/* Literal.String.Doc */
/* Literal.String.Double */
/* Literal.String.Escape */
/* Literal.String.Heredoc */
/* Literal.String.Interpol */
/* Literal.String.Other */
/* Literal.String.Regex */
/* Literal.String.Single */
/* Literal.String.Symbol */
/* Name.Builtin.Pseudo */
/* Name.Variable.Class */
/* Name.Variable.Global */
/* Name.Variable.Instance */
/* Literal.Number.Integer.Long */ }
.highlight .c {
color: #999988;
font-style: italic; }
.highlight .err {
color: #a61717;
background-color: #e3d2d2; }
.highlight .k {
color: #000000;
font-weight: bold; }
.highlight .o {
color: #000000;
font-weight: bold; }
.highlight .cm {
color: #999988;
font-style: italic; }
.highlight .cp {
color: #999999;
font-weight: bold; }
.highlight .c1 {
color: #999988;
font-style: italic; }
.highlight .cs {
color: #999999;
font-weight: bold;
font-style: italic; }
.highlight .gd {
color: #000000;
background-color: #ffdddd; }
.highlight .gd .x {
color: #000000;
background-color: #ffaaaa; }
.highlight .ge {
color: #000000;
font-style: italic; }
.highlight .gr {
color: #aa0000; }
.highlight .gh {
color: #999999; }
.highlight .gi {
color: #000000;
background-color: #ddffdd; }
.highlight .gi .x {
color: #000000;
background-color: #aaffaa; }
.highlight .go {
color: #888888; }
.highlight .gp {
color: #555555; }
.highlight .gs {
font-weight: bold; }
.highlight .gu {
color: #aaaaaa; }
.highlight .gt {
color: #aa0000; }
.highlight .kc {
color: #000000;
font-weight: bold; }
.highlight .kd {
color: #000000;
font-weight: bold; }
.highlight .kp {
color: #000000;
font-weight: bold; }
.highlight .kr {
color: #000000;
font-weight: bold; }
.highlight .kt {
color: #445588; }
.highlight .m {
color: #009999; }
.highlight .s {
color: #d14; }
.highlight .na {
color: #008080; }
.highlight .nb {
color: #0086B3; }
.highlight .nc {
color: #445588;
font-weight: bold; }
.highlight .no {
color: #008080; }
.highlight .ni {
color: #800080; }
.highlight .ne {
color: #990000;
font-weight: bold; }
.highlight .nf {
color: #990000; }
.highlight .nn {
color: #555555; }
.highlight .nt {
color: #000080; }
.highlight .nv {
color: #008080; }
.highlight .ow {
color: #000000;
font-weight: bold; }
.highlight .w {
color: #bbbbbb; }
.highlight .mf {
color: #009999; }
.highlight .mh {
color: #009999; }
.highlight .mi {
color: #009999; }
.highlight .mo {
color: #009999; }
.highlight .sb {
color: #d14; }
.highlight .sc {
color: #d14; }
.highlight .sd {
color: #d14; }
.highlight .s2 {
color: #d14; }
.highlight .se {
color: #d14; }
.highlight .sh {
color: #d14; }
.highlight .si {
color: #d14; }
.highlight .sx {
color: #d14; }
.highlight .sr {
color: #009926; }
.highlight .s1 {
color: #d14; }
.highlight .ss {
color: #990073; }
.highlight .bp {
color: #999999; }
.highlight .vc {
color: #008080; }
.highlight .vg {
color: #008080; }
.highlight .vi {
color: #008080; }
.highlight .il {
color: #009999; }
@@ -0,0 +1,331 @@
html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td {
background: transparent;
border: 0;
margin: 0;
outline: 0;
padding: 0;
vertical-align: baseline; }
body {
background-color: #f2f2f2;
font-family: Helvetica, freesans, Arial, sans-serif;
font-size: 14px;
-webkit-font-smoothing: subpixel-antialiased;
word-wrap: break-word; }
h1, h2, h3 {
margin-top: 0.8em;
margin-bottom: 0.3em;
font-weight: 100;
color: black; }
h1 {
font-size: 2.5em; }
h2 {
font-size: 2em;
border-bottom: 1px solid #e2e2e2; }
h4 {
font-size: 13px;
line-height: 1.5;
margin-top: 21px; }
h5 {
font-size: 1.1em; }
h6 {
font-size: 1.1em;
color: #777; }
.section-name {
color: gray;
display: block;
font-family: Helvetica;
font-size: 22px;
font-weight: 100;
margin-bottom: 15px; }
pre, code {
font: 0.95em Menlo, monospace;
color: #777;
word-wrap: normal; }
p code, li code {
background-color: #eee;
padding: 2px 4px;
border-radius: 4px; }
a {
color: #0088cc;
text-decoration: none; }
ul {
padding-left: 15px; }
li {
line-height: 1.8em; }
img {
max-width: 100%; }
blockquote {
margin-left: 0;
padding: 0 10px;
border-left: 4px solid #ccc; }
.content-wrapper {
margin: 0 auto;
width: 980px; }
header {
font-size: 0.85em;
line-height: 26px;
background-color: #414141;
position: fixed;
width: 100%;
z-index: 1; }
header img {
padding-right: 6px;
vertical-align: -4px;
height: 16px; }
header a {
color: #fff; }
header p {
float: left;
color: #999; }
header .header-right {
float: right;
margin-left: 16px; }
#breadcrumbs {
background-color: #f2f2f2;
height: 27px;
padding-top: 17px;
position: fixed;
width: 100%;
z-index: 1;
margin-top: 26px; }
#breadcrumbs #carat {
height: 10px;
margin: 0 5px; }
.sidebar {
background-color: #f9f9f9;
border: 1px solid #e2e2e2;
overflow-y: auto;
overflow-x: hidden;
position: fixed;
top: 70px;
bottom: 0;
width: 230px;
word-wrap: normal; }
.nav-groups {
list-style-type: none;
background: #fff;
padding-left: 0; }
.nav-group-name {
border-bottom: 1px solid #e2e2e2;
font-size: 1.1em;
font-weight: 100;
padding: 15px 0 15px 20px; }
.nav-group-name > a {
color: #333; }
.nav-group-tasks {
margin-top: 5px; }
.nav-group-task {
font-size: 0.9em;
list-style-type: none; }
.nav-group-task a {
color: #888; }
.main-content {
background-color: #fff;
border: 1px solid #e2e2e2;
margin-left: 246px;
position: absolute;
overflow: hidden;
padding-bottom: 60px;
top: 70px;
width: 734px; }
.main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote {
margin-bottom: 1em; }
.main-content p {
line-height: 1.8em; }
.main-content section .section:first-child {
margin-top: 0;
padding-top: 0; }
.main-content section .task-group-section .task-group:first-of-type {
padding-top: 10px; }
.main-content section .task-group-section .task-group:first-of-type .section-name {
padding-top: 15px; }
.section {
padding: 0 25px; }
.highlight {
background-color: #eee;
padding: 10px 12px;
border: 1px solid #e2e2e2;
border-radius: 4px;
overflow-x: auto; }
.declaration .highlight {
overflow-x: initial;
padding: 0 40px 40px 0;
margin-bottom: -25px;
background-color: transparent;
border: none; }
.section-name {
margin: 0;
margin-left: 18px; }
.task-group-section {
padding-left: 6px;
border-top: 1px solid #e2e2e2; }
.task-group {
padding-top: 0px; }
.task-name-container a[name]:before {
content: "";
display: block;
padding-top: 70px;
margin: -70px 0 0; }
.item {
padding-top: 8px;
width: 100%;
list-style-type: none; }
.item a[name]:before {
content: "";
display: block;
padding-top: 70px;
margin: -70px 0 0; }
.item code {
background-color: transparent;
padding: 0; }
.item .token {
padding-left: 3px;
margin-left: 15px;
font-size: 11.9px; }
.item .declaration-note {
font-size: .85em;
color: gray;
font-style: italic; }
.pointer-container {
border-bottom: 1px solid #e2e2e2;
left: -23px;
padding-bottom: 13px;
position: relative;
width: 110%; }
.pointer {
background: #f9f9f9;
border-left: 1px solid #e2e2e2;
border-top: 1px solid #e2e2e2;
height: 12px;
left: 21px;
top: -7px;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
position: absolute;
width: 12px; }
.height-container {
display: none;
left: -25px;
padding: 0 25px;
position: relative;
width: 100%;
overflow: hidden; }
.height-container .section {
background: #f9f9f9;
border-bottom: 1px solid #e2e2e2;
left: -25px;
position: relative;
width: 100%;
padding-top: 10px;
padding-bottom: 5px; }
.aside, .language {
padding: 6px 12px;
margin: 12px 0;
border-left: 5px solid #dddddd;
overflow-y: hidden; }
.aside .aside-title, .language .aside-title {
font-size: 9px;
letter-spacing: 2px;
text-transform: uppercase;
padding-bottom: 0;
margin: 0;
color: #aaa;
-webkit-user-select: none; }
.aside p:last-child, .language p:last-child {
margin-bottom: 0; }
.language {
border-left: 5px solid #cde9f4; }
.language .aside-title {
color: #4b8afb; }
.aside-warning {
border-left: 5px solid #ff6666; }
.aside-warning .aside-title {
color: #ff0000; }
.graybox {
border-collapse: collapse;
width: 100%; }
.graybox p {
margin: 0;
word-break: break-word;
min-width: 50px; }
.graybox td {
border: 1px solid #e2e2e2;
padding: 5px 25px 5px 10px;
vertical-align: middle; }
.graybox tr td:first-of-type {
text-align: right;
padding: 7px;
vertical-align: top;
word-break: normal;
width: 40px; }
.slightly-smaller {
font-size: 0.9em; }
#footer {
position: absolute;
bottom: 10px;
margin-left: 25px; }
#footer p {
margin: 0;
color: #aaa;
font-size: 0.8em; }
html.dash header, html.dash #breadcrumbs, html.dash .sidebar {
display: none; }
html.dash .main-content {
width: 980px;
margin-left: 0;
border: none;
width: 100%;
top: 0;
padding-bottom: 0; }
html.dash .height-container {
display: block; }
html.dash .item .token {
margin-left: 0; }
html.dash .content-wrapper {
width: auto; }
html.dash #footer {
position: static; }
Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@@ -0,0 +1,186 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>PreviewTransitionDemo Reference</title>
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
<meta charset='utf-8'>
<script src="js/jquery.min.js" defer></script>
<script src="js/jazzy.js" defer></script>
</head>
<body>
<a title="PreviewTransitionDemo Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="index.html">PreviewTransitionDemo Docs</a> (82% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="index.html">PreviewTransitionDemo Reference</a>
<img id="carat" src="img/carat.png" />
PreviewTransitionDemo Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Classes/PTDetailViewController.html">PTDetailViewController</a>
</li>
<li class="nav-group-task">
<a href="Classes/PTTableViewController.html">PTTableViewController</a>
</li>
<li class="nav-group-task">
<a href="Classes/ParallaxCell.html">ParallaxCell</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<p><img src="https://raw.githubusercontent.com/Ramotion/preview-transition/master/header.png" alt="header"></p>
<a href='#preview_transition_a_href_http_twitter_com_ramotion_img_src_https_img_shields_io_badge_twitter_ramotion_blue_svg_style_flat_alt_twitter_a' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h1 id='preview_transition_a_href_http_twitter_com_ramotion_img_src_https_img_shields_io_badge_twitter_ramotion_blue_svg_style_flat_alt_twitter_a'>Preview-transition <a href="http://twitter.com/Ramotion"><img src="https://img.shields.io/badge/Twitter-@Ramotion-blue.svg?style=flat" alt="Twitter"></a></h1>
<p><a href="https://travis-ci.org/Ramotion/preview-transition.svg?branch=master"><img src="https://img.shields.io/travis/Ramotion/preview-transition.svg" alt="Travis"></a>
<a href="https://github.com/Ramotion/preview-transition"><img src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat" alt="Carthage compatible"></a>
<a href="https://cocoapods.org/pods/PreviewTransition"><img src="https://img.shields.io/cocoapods/p/PreviewTransition.svg" alt="CocoaPods"></a>
<a href="http://cocoapods.org/pods/PreviewTransition"><img src="https://img.shields.io/cocoapods/v/PreviewTransition.svg" alt="CocoaPods"></a>
<a href="https://cdn.rawgit.com/Ramotion/preview-transition/master/docs/index.html"><img src="https://img.shields.io/cocoapods/metrics/doc-percent/PreviewTransition.svg" alt="CocoaPods"></a>
<a href="https://codebeat.co/projects/github-com-ramotion-preview-transition"><img src="https://codebeat.co/badges/b99f71fe-b7e7-4a08-94bd-d98307d176ea" alt="codebeat badge"></a></p>
<p><a href="https://dribbble.com/shots/2724735-iOS-Preview-Transition-Open-Source">shot on dribbble</a>:
<p align="center">
<a href="https://dribbble.com/shots/2694049-iOS-Pagination-Controller-Open-Source"><img src="https://raw.githubusercontent.com/Ramotion/preview-transition/master/preview.gif" width="890" height="668" alt="StackViewController Example App" /></a>
</p></p>
<p>The <a href="https://store.ramotion.com/product/iphone-6-mockups?utm_source=gthb&amp;utm_medium=special&amp;utm_campaign=preview-transition">iPhone mockup</a> available <a href="https://store.ramotion.com/product/iphone-6-mockups?utm_source=gthb&amp;utm_medium=special&amp;utm_campaign=preview-transition">here</a>.</p>
<a href='#requirements' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='requirements'>Requirements</h2>
<ul>
<li>iOS 8.0+</li>
<li>Xcode 7.3</li>
</ul>
<a href='#licence' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='licence'>Licence</h2>
<p>Preview-transition is released under the MIT license.
See <a href="./LICENSE">LICENSE</a> for details.</p>
<p>Just add the Source folder to your project or use <a href="https://cocoapods.org">CocoaPods</a> like this:
<code>ruby
pod &#39;PreviewTransition&#39;
</code></p>
<p>or <a href="https://github.com/Carthage/Carthage">Carthage</a> users can simply add to their <code>Cartfile</code>:
<code>
github &quot;Ramotion/preview-transition&quot;
</code></p>
<a href='#usage' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='usage'>Usage</h2>
<p>1) <code>import PreviewTransition</code></p>
<p>2) Create UITableViewController inherit, inheriting from <code>PTTableViewController</code></p>
<p>3) Add UITableViewDelegate methods</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">tableView</span><span class="p">(</span><span class="nv">tableView</span><span class="p">:</span> <span class="kt">UITableView</span><span class="p">,</span> <span class="n">numberOfRowsInSection</span> <span class="nv">section</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Int</span> <span class="p">{</span>
<span class="k">return</span> <span class="o">&lt;</span><span class="kt">RowsCount</span><span class="o">&gt;</span>
<span class="p">}</span>
<span class="kd">public</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">tableView</span><span class="p">(</span><span class="nv">tableView</span><span class="p">:</span> <span class="kt">UITableView</span><span class="p">,</span> <span class="n">cellForRowAtIndexPath</span> <span class="nv">indexPath</span><span class="p">:</span> <span class="kt">NSIndexPath</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">UITableViewCell</span> <span class="p">{</span>
<span class="k">return</span> <span class="n">tableView</span><span class="o">.</span><span class="nf">dequeueReusableCellWithIdentifier</span><span class="p">(</span><span class="o">&lt;</span><span class="kt">CellIdentifier</span><span class="o">&gt;</span><span class="p">,</span> <span class="nv">forIndexPath</span><span class="p">:</span> <span class="n">indexPath</span><span class="p">)</span>
<span class="p">}</span>
</code></pre>
<p>4) add a ParallaxCell</p>
<p>storyboards:
create a cell and inherit from <code>ParallaxCell</code>; don&rsquo;t forget set the identifier <code>&lt;CellIdentifier&gt;</code></p>
<p>or programmatically:
register a cell in viewDidLoad <code>tableView.registerClass(ParallaxCell, forCellReuseIdentifier:&lt;CellIdentifier&gt;)</code></p>
<p>5) set cell height</p>
<p>6) create image names (image sizes must be equal to screen size or bigger)</p>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">images</span> <span class="o">=</span> <span class="p">[</span><span class="n">image_name</span><span class="p">,</span> <span class="n">image_name</span><span class="p">,</span> <span class="n">image_name</span><span class="p">,</span> <span class="n">image_name</span><span class="p">,</span> <span class="n">image_name</span><span class="p">]</span> <span class="c1">// image names</span>
</code></pre>
<p>7) set image and text for ParallaxCell</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">tableView</span><span class="p">(</span><span class="nv">tableView</span><span class="p">:</span> <span class="kt">UITableView</span><span class="p">,</span> <span class="n">willDisplayCell</span> <span class="nv">cell</span><span class="p">:</span> <span class="kt">UITableViewCell</span><span class="p">,</span> <span class="n">forRowAtIndexPath</span> <span class="nv">indexPath</span><span class="p">:</span> <span class="kt">NSIndexPath</span><span class="p">)</span> <span class="p">{</span>
<span class="k">guard</span> <span class="k">let</span> <span class="nv">cell</span> <span class="o">=</span> <span class="n">cell</span> <span class="k">as?</span> <span class="kt">ParallaxCell</span> <span class="k">else</span> <span class="p">{</span>
<span class="k">return</span>
<span class="p">}</span>
<span class="k">let</span> <span class="nv">imageName</span> <span class="o">=</span> <span class="n">images</span><span class="p">[</span><span class="n">indexPath</span><span class="o">.</span><span class="n">row</span><span class="p">]</span>
<span class="k">if</span> <span class="k">let</span> <span class="nv">image</span> <span class="o">=</span> <span class="kt">UIImage</span><span class="p">(</span><span class="nv">named</span><span class="p">:</span> <span class="n">imageName</span><span class="p">)</span> <span class="p">{</span>
<span class="n">cell</span><span class="o">.</span><span class="nf">setImage</span><span class="p">(</span><span class="n">image</span><span class="p">,</span> <span class="nv">title</span><span class="p">:</span> <span class="o">&lt;</span><span class="kt">SetText</span><span class="o">&gt;</span><span class="p">)</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
<p>your tableViewController should look like <a href="https://github.com/Ramotion/preview-transition/blob/master/PreviewTransitionDemo/PreviewTransitionDemo/ViewController/DemoTableViewController.swift">DemoTableViewController</a></p>
<p>Method <code>public override func tableView(tableView: didSelectRowAtIndexPath indexPath:)</code> we will add later. (step 10)</p>
<p>8) Create UIViewController, inheriting from <code>PTDetailViewController</code></p>
<p>9) Add action for backButton and call <code>popViewController()</code></p>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">backButtonHandler</span><span class="p">()</span> <span class="p">{</span>
<span class="nf">popViewController</span><span class="p">()</span>
<span class="p">}</span>
</code></pre>
<p>10) Push this UIViewController in UITableViewController. Add method</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">tableView</span><span class="p">(</span><span class="nv">tableView</span><span class="p">:</span> <span class="kt">UITableView</span><span class="p">,</span> <span class="n">didSelectRowAtIndexPath</span> <span class="nv">indexPath</span><span class="p">:</span> <span class="kt">NSIndexPath</span><span class="p">)</span> <span class="p">{</span>
<span class="c1">// create viewController</span>
<span class="kd">let</span> <span class="o">&lt;</span><span class="kt">YourViewController</span><span class="o">&gt;</span> <span class="o">=</span> <span class="n">storyboard</span><span class="p">?</span><span class="o">.</span><span class="nf">instantiateViewControllerWithIdentifier</span><span class="p">(</span><span class="o">&lt;</span><span class="n">identifier</span><span class="o">&gt;</span><span class="p">)</span>
<span class="k">if</span> <span class="k">case</span> <span class="k">let</span> <span class="nv">viewController</span> <span class="k">as</span> <span class="o">&lt;</span><span class="kt">YourViewController</span><span class="o">&gt;</span> <span class="o">=</span> <span class="n">viewController</span> <span class="p">{</span>
<span class="nf">pushViewController</span><span class="p">(</span><span class="n">viewController</span><span class="p">)</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
<p>11) Configure UINavigationBar</p>
<pre class="highlight swift"><code><span class="c1">// transparent background</span>
<span class="kt">UINavigationBar</span><span class="o">.</span><span class="nf">appearance</span><span class="p">()</span><span class="o">.</span><span class="nf">setBackgroundImage</span><span class="p">(</span><span class="kt">UIImage</span><span class="p">(),</span> <span class="nv">forBarMetrics</span><span class="p">:</span> <span class="o">.</span><span class="kt">Default</span><span class="p">)</span>
<span class="kt">UINavigationBar</span><span class="o">.</span><span class="nf">appearance</span><span class="p">()</span><span class="o">.</span><span class="n">shadowImage</span> <span class="o">=</span> <span class="kt">UIImage</span><span class="p">()</span>
<span class="kt">UINavigationBar</span><span class="o">.</span><span class="nf">appearance</span><span class="p">()</span><span class="o">.</span><span class="n">translucent</span> <span class="o">=</span> <span class="kc">true</span>
<span class="kt">UINavigationBar</span><span class="o">.</span><span class="nf">appearance</span><span class="p">()</span><span class="o">.</span><span class="n">tintColor</span> <span class="o">=</span> <span class="o">.</span><span class="nf">whiteColor</span><span class="p">()</span>
<span class="c1">// set font</span>
<span class="k">if</span> <span class="k">let</span> <span class="nv">font</span> <span class="o">=</span> <span class="kt">UIFont</span><span class="p">(</span><span class="nv">name</span><span class="p">:</span> <span class="o">&lt;</span><span class="kt">Font</span> <span class="n">name</span><span class="o">&gt;</span> <span class="p">,</span> <span class="nv">size</span><span class="p">:</span> <span class="mi">18</span><span class="p">)</span> <span class="p">{</span>
<span class="kt">UINavigationBar</span><span class="o">.</span><span class="nf">appearance</span><span class="p">()</span><span class="o">.</span><span class="n">titleTextAttributes</span> <span class="o">=</span> <span class="p">[</span>
<span class="kt">NSForegroundColorAttributeName</span> <span class="p">:</span> <span class="kt">UIColor</span><span class="o">.</span><span class="nf">whiteColor</span><span class="p">(),</span>
<span class="kt">NSFontAttributeName</span> <span class="p">:</span> <span class="n">font</span>
<span class="p">]</span>
<span class="p">}</span>
</code></pre>
<a href='#about' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='about'>About</h2>
<p>The project maintained by <a href="https://ramotion.com?utm_source=gthb&amp;utm_medium=special&amp;utm_campaign=preview-transition">app development agency</a> <a href="https://ramotion.com?utm_source=gthb&amp;utm_medium=special&amp;utm_campaign=preview-transition">Ramotion Inc.</a>
See our other <a href="https://github.com/ramotion">open-source projects</a> or <a href="https://ramotion.com?utm_source=gthb&amp;utm_medium=special&amp;utm_campaign=preview-transition">hire</a> us to design, develop, and grow your product.</p>
<p><a href="https://twitter.com/intent/tweet?text=https://github.com/ramotion/preview-transition"><img src="https://img.shields.io/twitter/url/http/shields.io.svg?style=social" alt="Twitter URL"></a>
<a href="https://twitter.com/ramotion"><img src="https://img.shields.io/twitter/follow/ramotion.svg?style=social" alt="Twitter Follow"></a></p>
</section>
</section>
<section id="footer">
<p>&copy; 2016 <a class="link" href="" target="_blank" rel="external">AlexKalinkin</a>. All rights reserved. (Last updated: 2016-06-10)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
@@ -0,0 +1,40 @@
window.jazzy = {'docset': false}
if (typeof window.dash != 'undefined') {
document.documentElement.className += ' dash'
window.jazzy.docset = true
}
if (navigator.userAgent.match(/xcode/i)) {
document.documentElement.className += ' xcode'
window.jazzy.docset = true
}
// On doc load, toggle the URL hash discussion if present
$(document).ready(function() {
if (!window.jazzy.docset) {
var linkToHash = $('a[href="' + window.location.hash +'"]');
linkToHash.trigger("click");
}
});
// On token click, toggle its discussion and animate token.marginLeft
$(".token").click(function(event) {
if (window.jazzy.docset) {
return;
}
var link = $(this);
var animationDuration = 300;
var tokenOffset = "15px";
var original = link.css('marginLeft') == tokenOffset;
link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration);
$content = link.parent().parent().next();
$content.slideToggle(animationDuration);
// Keeps the document from jumping to the hash.
var href = $(this).attr('href');
if (history.pushState) {
history.pushState({}, '', href);
} else {
location.hash = href;
}
event.preventDefault();
});
File diff suppressed because one or more lines are too long
@@ -0,0 +1,6 @@
DemoTableViewController.swift
public class DemoTableViewController: PTTableViewController
public class DemoTableViewController : PTTableViewController
DemoDetailViewController.swift
public class DemoDetailViewController: PTDetailViewController
public class DemoDetailViewController : PTDetailViewController
Binary file not shown.
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

+186
View File
@@ -0,0 +1,186 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>PreviewTransitionDemo Reference</title>
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
<meta charset='utf-8'>
<script src="js/jquery.min.js" defer></script>
<script src="js/jazzy.js" defer></script>
</head>
<body>
<a title="PreviewTransitionDemo Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="index.html">PreviewTransitionDemo Docs</a> (82% documented)</p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="index.html">PreviewTransitionDemo Reference</a>
<img id="carat" src="img/carat.png" />
PreviewTransitionDemo Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Classes/PTDetailViewController.html">PTDetailViewController</a>
</li>
<li class="nav-group-task">
<a href="Classes/PTTableViewController.html">PTTableViewController</a>
</li>
<li class="nav-group-task">
<a href="Classes/ParallaxCell.html">ParallaxCell</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<p><img src="https://raw.githubusercontent.com/Ramotion/preview-transition/master/header.png" alt="header"></p>
<a href='#preview_transition_a_href_http_twitter_com_ramotion_img_src_https_img_shields_io_badge_twitter_ramotion_blue_svg_style_flat_alt_twitter_a' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h1 id='preview_transition_a_href_http_twitter_com_ramotion_img_src_https_img_shields_io_badge_twitter_ramotion_blue_svg_style_flat_alt_twitter_a'>Preview-transition <a href="http://twitter.com/Ramotion"><img src="https://img.shields.io/badge/Twitter-@Ramotion-blue.svg?style=flat" alt="Twitter"></a></h1>
<p><a href="https://travis-ci.org/Ramotion/preview-transition.svg?branch=master"><img src="https://img.shields.io/travis/Ramotion/preview-transition.svg" alt="Travis"></a>
<a href="https://github.com/Ramotion/preview-transition"><img src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat" alt="Carthage compatible"></a>
<a href="https://cocoapods.org/pods/PreviewTransition"><img src="https://img.shields.io/cocoapods/p/PreviewTransition.svg" alt="CocoaPods"></a>
<a href="http://cocoapods.org/pods/PreviewTransition"><img src="https://img.shields.io/cocoapods/v/PreviewTransition.svg" alt="CocoaPods"></a>
<a href="https://cdn.rawgit.com/Ramotion/preview-transition/master/docs/index.html"><img src="https://img.shields.io/cocoapods/metrics/doc-percent/PreviewTransition.svg" alt="CocoaPods"></a>
<a href="https://codebeat.co/projects/github-com-ramotion-preview-transition"><img src="https://codebeat.co/badges/b99f71fe-b7e7-4a08-94bd-d98307d176ea" alt="codebeat badge"></a></p>
<p><a href="https://dribbble.com/shots/2724735-iOS-Preview-Transition-Open-Source">shot on dribbble</a>:
<p align="center">
<a href="https://dribbble.com/shots/2694049-iOS-Pagination-Controller-Open-Source"><img src="https://raw.githubusercontent.com/Ramotion/preview-transition/master/preview.gif" width="890" height="668" alt="StackViewController Example App" /></a>
</p></p>
<p>The <a href="https://store.ramotion.com/product/iphone-6-mockups?utm_source=gthb&amp;utm_medium=special&amp;utm_campaign=preview-transition">iPhone mockup</a> available <a href="https://store.ramotion.com/product/iphone-6-mockups?utm_source=gthb&amp;utm_medium=special&amp;utm_campaign=preview-transition">here</a>.</p>
<a href='#requirements' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='requirements'>Requirements</h2>
<ul>
<li>iOS 8.0+</li>
<li>Xcode 7.3</li>
</ul>
<a href='#licence' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='licence'>Licence</h2>
<p>Preview-transition is released under the MIT license.
See <a href="./LICENSE">LICENSE</a> for details.</p>
<p>Just add the Source folder to your project or use <a href="https://cocoapods.org">CocoaPods</a> like this:
<code>ruby
pod &#39;PreviewTransition&#39;
</code></p>
<p>or <a href="https://github.com/Carthage/Carthage">Carthage</a> users can simply add to their <code>Cartfile</code>:
<code>
github &quot;Ramotion/preview-transition&quot;
</code></p>
<a href='#usage' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='usage'>Usage</h2>
<p>1) <code>import PreviewTransition</code></p>
<p>2) Create UITableViewController inherit, inheriting from <code>PTTableViewController</code></p>
<p>3) Add UITableViewDelegate methods</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">tableView</span><span class="p">(</span><span class="nv">tableView</span><span class="p">:</span> <span class="kt">UITableView</span><span class="p">,</span> <span class="n">numberOfRowsInSection</span> <span class="nv">section</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Int</span> <span class="p">{</span>
<span class="k">return</span> <span class="o">&lt;</span><span class="kt">RowsCount</span><span class="o">&gt;</span>
<span class="p">}</span>
<span class="kd">public</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">tableView</span><span class="p">(</span><span class="nv">tableView</span><span class="p">:</span> <span class="kt">UITableView</span><span class="p">,</span> <span class="n">cellForRowAtIndexPath</span> <span class="nv">indexPath</span><span class="p">:</span> <span class="kt">NSIndexPath</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">UITableViewCell</span> <span class="p">{</span>
<span class="k">return</span> <span class="n">tableView</span><span class="o">.</span><span class="nf">dequeueReusableCellWithIdentifier</span><span class="p">(</span><span class="o">&lt;</span><span class="kt">CellIdentifier</span><span class="o">&gt;</span><span class="p">,</span> <span class="nv">forIndexPath</span><span class="p">:</span> <span class="n">indexPath</span><span class="p">)</span>
<span class="p">}</span>
</code></pre>
<p>4) add a ParallaxCell</p>
<p>storyboards:
create a cell and inherit from <code>ParallaxCell</code>; don&rsquo;t forget set the identifier <code>&lt;CellIdentifier&gt;</code></p>
<p>or programmatically:
register a cell in viewDidLoad <code>tableView.registerClass(ParallaxCell, forCellReuseIdentifier:&lt;CellIdentifier&gt;)</code></p>
<p>5) set cell height</p>
<p>6) create image names (image sizes must be equal to screen size or bigger)</p>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">images</span> <span class="o">=</span> <span class="p">[</span><span class="n">image_name</span><span class="p">,</span> <span class="n">image_name</span><span class="p">,</span> <span class="n">image_name</span><span class="p">,</span> <span class="n">image_name</span><span class="p">,</span> <span class="n">image_name</span><span class="p">]</span> <span class="c1">// image names</span>
</code></pre>
<p>7) set image and text for ParallaxCell</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">tableView</span><span class="p">(</span><span class="nv">tableView</span><span class="p">:</span> <span class="kt">UITableView</span><span class="p">,</span> <span class="n">willDisplayCell</span> <span class="nv">cell</span><span class="p">:</span> <span class="kt">UITableViewCell</span><span class="p">,</span> <span class="n">forRowAtIndexPath</span> <span class="nv">indexPath</span><span class="p">:</span> <span class="kt">NSIndexPath</span><span class="p">)</span> <span class="p">{</span>
<span class="k">guard</span> <span class="k">let</span> <span class="nv">cell</span> <span class="o">=</span> <span class="n">cell</span> <span class="k">as?</span> <span class="kt">ParallaxCell</span> <span class="k">else</span> <span class="p">{</span>
<span class="k">return</span>
<span class="p">}</span>
<span class="k">let</span> <span class="nv">imageName</span> <span class="o">=</span> <span class="n">images</span><span class="p">[</span><span class="n">indexPath</span><span class="o">.</span><span class="n">row</span><span class="p">]</span>
<span class="k">if</span> <span class="k">let</span> <span class="nv">image</span> <span class="o">=</span> <span class="kt">UIImage</span><span class="p">(</span><span class="nv">named</span><span class="p">:</span> <span class="n">imageName</span><span class="p">)</span> <span class="p">{</span>
<span class="n">cell</span><span class="o">.</span><span class="nf">setImage</span><span class="p">(</span><span class="n">image</span><span class="p">,</span> <span class="nv">title</span><span class="p">:</span> <span class="o">&lt;</span><span class="kt">SetText</span><span class="o">&gt;</span><span class="p">)</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
<p>your tableViewController should look like <a href="https://github.com/Ramotion/preview-transition/blob/master/PreviewTransitionDemo/PreviewTransitionDemo/ViewController/DemoTableViewController.swift">DemoTableViewController</a></p>
<p>Method <code>public override func tableView(tableView: didSelectRowAtIndexPath indexPath:)</code> we will add later. (step 10)</p>
<p>8) Create UIViewController, inheriting from <code>PTDetailViewController</code></p>
<p>9) Add action for backButton and call <code>popViewController()</code></p>
<pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">backButtonHandler</span><span class="p">()</span> <span class="p">{</span>
<span class="nf">popViewController</span><span class="p">()</span>
<span class="p">}</span>
</code></pre>
<p>10) Push this UIViewController in UITableViewController. Add method</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">tableView</span><span class="p">(</span><span class="nv">tableView</span><span class="p">:</span> <span class="kt">UITableView</span><span class="p">,</span> <span class="n">didSelectRowAtIndexPath</span> <span class="nv">indexPath</span><span class="p">:</span> <span class="kt">NSIndexPath</span><span class="p">)</span> <span class="p">{</span>
<span class="c1">// create viewController</span>
<span class="kd">let</span> <span class="o">&lt;</span><span class="kt">YourViewController</span><span class="o">&gt;</span> <span class="o">=</span> <span class="n">storyboard</span><span class="p">?</span><span class="o">.</span><span class="nf">instantiateViewControllerWithIdentifier</span><span class="p">(</span><span class="o">&lt;</span><span class="n">identifier</span><span class="o">&gt;</span><span class="p">)</span>
<span class="k">if</span> <span class="k">case</span> <span class="k">let</span> <span class="nv">viewController</span> <span class="k">as</span> <span class="o">&lt;</span><span class="kt">YourViewController</span><span class="o">&gt;</span> <span class="o">=</span> <span class="n">viewController</span> <span class="p">{</span>
<span class="nf">pushViewController</span><span class="p">(</span><span class="n">viewController</span><span class="p">)</span>
<span class="p">}</span>
<span class="p">}</span>
</code></pre>
<p>11) Configure UINavigationBar</p>
<pre class="highlight swift"><code><span class="c1">// transparent background</span>
<span class="kt">UINavigationBar</span><span class="o">.</span><span class="nf">appearance</span><span class="p">()</span><span class="o">.</span><span class="nf">setBackgroundImage</span><span class="p">(</span><span class="kt">UIImage</span><span class="p">(),</span> <span class="nv">forBarMetrics</span><span class="p">:</span> <span class="o">.</span><span class="kt">Default</span><span class="p">)</span>
<span class="kt">UINavigationBar</span><span class="o">.</span><span class="nf">appearance</span><span class="p">()</span><span class="o">.</span><span class="n">shadowImage</span> <span class="o">=</span> <span class="kt">UIImage</span><span class="p">()</span>
<span class="kt">UINavigationBar</span><span class="o">.</span><span class="nf">appearance</span><span class="p">()</span><span class="o">.</span><span class="n">translucent</span> <span class="o">=</span> <span class="kc">true</span>
<span class="kt">UINavigationBar</span><span class="o">.</span><span class="nf">appearance</span><span class="p">()</span><span class="o">.</span><span class="n">tintColor</span> <span class="o">=</span> <span class="o">.</span><span class="nf">whiteColor</span><span class="p">()</span>
<span class="c1">// set font</span>
<span class="k">if</span> <span class="k">let</span> <span class="nv">font</span> <span class="o">=</span> <span class="kt">UIFont</span><span class="p">(</span><span class="nv">name</span><span class="p">:</span> <span class="o">&lt;</span><span class="kt">Font</span> <span class="n">name</span><span class="o">&gt;</span> <span class="p">,</span> <span class="nv">size</span><span class="p">:</span> <span class="mi">18</span><span class="p">)</span> <span class="p">{</span>
<span class="kt">UINavigationBar</span><span class="o">.</span><span class="nf">appearance</span><span class="p">()</span><span class="o">.</span><span class="n">titleTextAttributes</span> <span class="o">=</span> <span class="p">[</span>
<span class="kt">NSForegroundColorAttributeName</span> <span class="p">:</span> <span class="kt">UIColor</span><span class="o">.</span><span class="nf">whiteColor</span><span class="p">(),</span>
<span class="kt">NSFontAttributeName</span> <span class="p">:</span> <span class="n">font</span>
<span class="p">]</span>
<span class="p">}</span>
</code></pre>
<a href='#about' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='about'>About</h2>
<p>The project maintained by <a href="https://ramotion.com?utm_source=gthb&amp;utm_medium=special&amp;utm_campaign=preview-transition">app development agency</a> <a href="https://ramotion.com?utm_source=gthb&amp;utm_medium=special&amp;utm_campaign=preview-transition">Ramotion Inc.</a>
See our other <a href="https://github.com/ramotion">open-source projects</a> or <a href="https://ramotion.com?utm_source=gthb&amp;utm_medium=special&amp;utm_campaign=preview-transition">hire</a> us to design, develop, and grow your product.</p>
<p><a href="https://twitter.com/intent/tweet?text=https://github.com/ramotion/preview-transition"><img src="https://img.shields.io/twitter/url/http/shields.io.svg?style=social" alt="Twitter URL"></a>
<a href="https://twitter.com/ramotion"><img src="https://img.shields.io/twitter/follow/ramotion.svg?style=social" alt="Twitter Follow"></a></p>
</section>
</section>
<section id="footer">
<p>&copy; 2016 <a class="link" href="" target="_blank" rel="external">AlexKalinkin</a>. All rights reserved. (Last updated: 2016-06-10)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.5.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>
+40
View File
@@ -0,0 +1,40 @@
window.jazzy = {'docset': false}
if (typeof window.dash != 'undefined') {
document.documentElement.className += ' dash'
window.jazzy.docset = true
}
if (navigator.userAgent.match(/xcode/i)) {
document.documentElement.className += ' xcode'
window.jazzy.docset = true
}
// On doc load, toggle the URL hash discussion if present
$(document).ready(function() {
if (!window.jazzy.docset) {
var linkToHash = $('a[href="' + window.location.hash +'"]');
linkToHash.trigger("click");
}
});
// On token click, toggle its discussion and animate token.marginLeft
$(".token").click(function(event) {
if (window.jazzy.docset) {
return;
}
var link = $(this);
var animationDuration = 300;
var tokenOffset = "15px";
var original = link.css('marginLeft') == tokenOffset;
link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration);
$content = link.parent().parent().next();
$content.slideToggle(animationDuration);
// Keeps the document from jumping to the hash.
var href = $(this).attr('href');
if (history.pushState) {
history.pushState({}, '', href);
} else {
location.hash = href;
}
event.preventDefault();
});
Vendored Executable
+4
View File
File diff suppressed because one or more lines are too long
+6
View File
@@ -0,0 +1,6 @@
DemoTableViewController.swift
public class DemoTableViewController: PTTableViewController
public class DemoTableViewController : PTTableViewController
DemoDetailViewController.swift
public class DemoDetailViewController: PTDetailViewController
public class DemoDetailViewController : PTDetailViewController
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 MiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 MiB