[
  {
    "path": ".gitignore",
    "content": "# Xcode\n#\n# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore\n\n# OS X\n.DS_Store\n\n## Build generated\nbuild/\nDerivedData/\n\n## Various settings\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspectivev3\nxcuserdata/\n\n## Other\n*.moved-aside\n*.xcuserstate\n\n## Obj-C/Swift specific\n*.hmap\n*.ipa\n*.dSYM.zip\n*.dSYM\n\n## Playgrounds\ntimeline.xctimeline\nplayground.xcworkspace\n\n# Swift Package Manager\n#\n# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.\n# Packages/\n.build/\n\n# CocoaPods\n#\n# We recommend against adding the Pods directory to your .gitignore. However\n# you should judge for yourself, the pros and cons are mentioned at:\n# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control\n#\nPods/\n\n# Carthage\n#\n# Add this line if you want to avoid checking in source code from Carthage dependencies.\n# Carthage/Checkouts\n\nCarthage/Build\n\n# fastlane\n#\n# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the\n# screenshots whenever they are needed.\n# For more information about the recommended setup visit:\n# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md\n\nfastlane/report.xml\nfastlane/Preview.html\nfastlane/screenshots\nfastlane/test_output\n"
  },
  {
    "path": ".swift-version",
    "content": "3.0\n"
  },
  {
    "path": "HoverConversion/HCContentViewController.swift",
    "content": "//\n//  HCContentViewController.swift\n//  HoverConversion\n//\n//  Created by Taiki Suzuki on 2016/07/18.\n//  Copyright © 2016年 marty-suzuki. All rights reserved.\n//\n\nimport UIKit\n\npublic protocol HCContentViewControllerScrollDelegate: class {\n    func contentViewController(_ viewController: HCContentViewController, scrollViewWillBeginDragging scrollView: UIScrollView)\n    func contentViewController(_ viewController: HCContentViewController, scrollViewDidScroll scrollView: UIScrollView)\n    func contentViewController(_ viewController: HCContentViewController, scrollViewDidEndDragging scrollView: UIScrollView, willDecelerate decelerate: Bool)\n    func contentViewController(_ viewController: HCContentViewController, handlePanGesture gesture: UIPanGestureRecognizer)\n}\n\npublic struct PagableHandler {\n    public enum Direction {\n        case prev, next\n    }\n    \n    private var values: [Direction : Bool] = [\n        .prev : true,\n        .next : true\n    ]\n    \n    public subscript(direction: Direction) -> Bool {\n        get {\n            return values[direction] ?? false\n        }\n        set {\n            values[direction] = newValue\n        }\n    }\n}\n\nopen class HCContentViewController: UIViewController, HCViewContentable {\n    \n    open var tableView: UITableView! = UITableView()\n    open var navigatoinContainerView: UIView! = UIView()\n    open var navigationView: HCNavigationView! = HCNavigationView(buttonPosition: .left)\n    let cellImageView = UIImageView(frame: .zero)\n    \n    open weak var scrollDelegate: HCContentViewControllerScrollDelegate?\n    open var canPaging: PagableHandler = PagableHandler()\n    \n    open override var title: String? {\n        didSet {\n            navigationView?.titleLabel.text = title\n        }\n    }\n    \n    override open func viewDidLoad() {\n        super.viewDidLoad()\n\n        // Do any additional setup after loading the view.\n        automaticallyAdjustsScrollViewInsets = false\n        addViews()\n        tableView.delegate = self\n        view.addSubview(cellImageView)\n        \n        let panGestureRecognizer = UIPanGestureRecognizer(target: self, action: #selector(HCContentViewController.handleNavigatoinContainerViewPanGesture(_:)))\n        navigatoinContainerView.addGestureRecognizer(panGestureRecognizer)\n    }\n\n    override open func didReceiveMemoryWarning() {\n        super.didReceiveMemoryWarning()\n        // Dispose of any resources that can be recreated.\n    }\n    \n    open func navigationView(_ navigationView: HCNavigationView, didTapLeftButton button: UIButton) {\n        _ = navigationController?.popViewController(animated: true)\n    }\n    \n    func handleNavigatoinContainerViewPanGesture(_ gesture: UIPanGestureRecognizer) {\n        scrollDelegate?.contentViewController(self, handlePanGesture: gesture)\n    }\n}\n\nextension HCContentViewController: UITableViewDelegate {\n    public func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {\n        scrollDelegate?.contentViewController(self, scrollViewWillBeginDragging: scrollView)\n    }\n    \n    public func scrollViewDidScroll(_ scrollView: UIScrollView) {\n        scrollDelegate?.contentViewController(self, scrollViewDidScroll: scrollView)\n    }\n    \n    public func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {\n        scrollDelegate?.contentViewController(self, scrollViewDidEndDragging: scrollView, willDecelerate: decelerate)\n    }\n}\n"
  },
  {
    "path": "HoverConversion/HCDefaultAnimatedTransitioning.swift",
    "content": "//\n//  HCDefaultAnimatedTransitioning.swift\n//  HoverConversion\n//\n//  Created by Taiki Suzuki on 2016/09/11.\n//  Copyright © 2016年 marty-suzuki. All rights reserved.\n//\n//\n\nimport UIKit\n\nclass HCDefaultAnimatedTransitioning: NSObject, UIViewControllerAnimatedTransitioning {\n    fileprivate struct Const {\n        static let defaultDuration: TimeInterval = 0.25\n        static let rootDuration: TimeInterval = 0.4\n        static let scaling: CGFloat = 0.95\n    }\n    \n    let operation: UINavigationControllerOperation\n    fileprivate let alphaView = UIView()\n    \n    init(operation: UINavigationControllerOperation) {\n        self.operation = operation\n        super.init()\n    }\n    \n    @objc func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval {\n        guard\n            let toVC = transitionContext?.viewController(forKey: UITransitionContextViewControllerKey.to),\n            let fromVC = transitionContext?.viewController(forKey: UITransitionContextViewControllerKey.from)\n        else {\n            return 0\n        }\n        switch (fromVC, toVC) {\n        case (_ as HCPagingViewController, _ as HCRootViewController): return Const.rootDuration\n        case (_ as HCRootViewController, _ as HCPagingViewController): return Const.rootDuration\n        default: return Const.defaultDuration\n        }\n    }\n    \n    // This method can only  be a nop if the transition is interactive and not a percentDriven interactive transition.\n    @objc func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {\n        guard\n            let toVC = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.to),\n            let fromVC = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.from)\n        else {\n            transitionContext.completeTransition(true)\n            return\n        }\n        \n        let containerView = transitionContext.containerView\n        containerView.backgroundColor = .black\n        alphaView.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.5)\n        alphaView.frame = containerView.bounds\n        \n        switch operation {\n        case .pop: popAnimation(transitionContext, toVC: toVC, fromVC: fromVC, containerView: containerView)\n        case .push: pushAnimation(transitionContext, toVC: toVC, fromVC: fromVC, containerView: containerView)\n        case .none: transitionContext.completeTransition(true)\n        }\n    }\n    \n    fileprivate func popAnimation(_ transitionContext: UIViewControllerContextTransitioning, toVC: UIViewController, fromVC: UIViewController, containerView: UIView) {\n        containerView.insertSubview(toVC.view, belowSubview: fromVC.view)\n        containerView.insertSubview(alphaView, belowSubview: fromVC.view)\n        \n        if let pagingVC = fromVC as? HCPagingViewController, let rootVC = toVC as? HCRootViewController {\n            let indexPath = pagingVC.currentIndexPath\n            //pagingVC.homeViewTalkContainerView.backgroundColor = .whiteColor()\n            if rootVC.tableView?.cellForRow(at: indexPath as IndexPath) == nil {\n                //rootVC.tableView?.scrollToRowAtIndexPath(indexPath, atScrollPosition: pagingVC.scrollDirection, animated: false)\n            }\n            rootVC.tableView?.selectRow(at: indexPath as IndexPath, animated: false, scrollPosition: .none)\n        }\n        \n        alphaView.alpha = 1\n        toVC.view.frame = containerView.bounds\n        toVC.view.transform = CGAffineTransform(scaleX: Const.scaling, y: Const.scaling)\n        \n        UIView.animate(withDuration: transitionDuration(using: transitionContext), delay: 0, options: .curveLinear, animations: {\n            toVC.view.transform = CGAffineTransform.identity\n            fromVC.view.frame.origin.x = containerView.bounds.size.width\n            self.alphaView.alpha = 0\n        }) { finished in\n            let canceled = transitionContext.transitionWasCancelled\n            if canceled {\n                toVC.view.removeFromSuperview()\n            } else {\n                fromVC.view.removeFromSuperview()\n            }\n            \n            toVC.view.transform = CGAffineTransform.identity\n            self.alphaView.removeFromSuperview()\n            \n            if let pagingVC = fromVC as? HCPagingViewController, let rootVC = toVC as? HCRootViewController {\n                let indexPath = pagingVC.currentIndexPath\n                rootVC.tableView?.deselectRow(at: indexPath as IndexPath, animated: true)\n            }\n            transitionContext.completeTransition(!canceled)\n        }\n    }\n    \n    fileprivate func pushAnimation(_ transitionContext: UIViewControllerContextTransitioning, toVC: UIViewController, fromVC: UIViewController, containerView: UIView) {\n        containerView.addSubview(alphaView)\n        containerView.addSubview(toVC.view)\n        \n        toVC.view.frame = containerView.bounds\n        toVC.view.frame.origin.x = containerView.bounds.size.width\n        alphaView.alpha = 0\n        \n        UIView.animate(withDuration: transitionDuration(using: transitionContext), delay: 0, options: .curveLinear, animations: {\n            fromVC.view.transform = CGAffineTransform(scaleX: Const.scaling, y: Const.scaling)\n            self.alphaView.alpha = 1\n            toVC.view.frame.origin.x = 0\n        }) { finished in\n            let canceled = transitionContext.transitionWasCancelled\n            if canceled {\n                toVC.view.removeFromSuperview()\n            }\n            \n            self.alphaView.removeFromSuperview()\n            fromVC.view.transform = CGAffineTransform.identity\n            \n            transitionContext.completeTransition(!canceled)\n        }\n    }\n}\n"
  },
  {
    "path": "HoverConversion/HCNavigationController.swift",
    "content": "//\n//  HCNavigationController.swift\n//\n//  Created by Taiki Suzuki on 2016/09/11.\n//  Copyright © 2016年 marty-suzuki. All rights reserved.\n//\n//\n\nimport UIKit\n\nopen class HCNavigationController: UINavigationController {\n    fileprivate struct Const {\n        fileprivate static let queueLabel = \"jp.marty-suzuki.HoverConversion.SynchronizationQueue\"\n        static let synchronizationQueue = DispatchQueue(label: queueLabel, attributes: [])\n        static func performBlock(_ block: @escaping () -> ()) {\n            synchronizationQueue.async {\n                DispatchQueue.main.sync(execute: block)\n            }\n        }\n    }\n        \n    enum SwipeType {\n        case edge, pan, none\n        var threshold: CGFloat {\n            switch self {\n            case .edge: return 0.3\n            case .pan: return 0.01\n            case .none: return 0\n            }\n        }\n    }\n    \n    fileprivate let interactiveTransition = UIPercentDrivenInteractiveTransition()\n    let interactiveEdgePanGestureRecognizer = UIScreenEdgePanGestureRecognizer()\n    let interactivePanGestureRecognizer = UIPanGestureRecognizer()\n    \n    fileprivate var isPaning = false\n    \n    \n    \n    override open func viewDidLoad() {\n        super.viewDidLoad()\n        \n        delegate = self\n        interactivePopGestureRecognizer?.isEnabled = false\n        \n        interactiveEdgePanGestureRecognizer.edges = .left\n        interactiveEdgePanGestureRecognizer.addTarget(self, action: #selector(HCNavigationController.handleInteractiveEdgePanGesture(_:)))\n        interactiveEdgePanGestureRecognizer.delegate = self\n        view.addGestureRecognizer(interactiveEdgePanGestureRecognizer)\n        \n        interactivePanGestureRecognizer.addTarget(self, action: #selector(HCNavigationController.handleInteractivePanGesture(_:)))\n        interactivePanGestureRecognizer.delegate = self\n        view.addGestureRecognizer(interactivePanGestureRecognizer)\n    }\n    \n    func interactiveEdgePanGestureRecognizerMakesToFail(gesture: UIGestureRecognizer) {\n        gesture.require(toFail: interactiveEdgePanGestureRecognizer)\n    }\n    \n    func interactivePanGestureRecognizerMakesToFail(gesture: UIGestureRecognizer) {\n        gesture.require(toFail: interactivePanGestureRecognizer)\n    }\n    \n    func handleInteractiveEdgePanGesture(_ edgePanGestureRecognizer: UIScreenEdgePanGestureRecognizer) {\n        handlePanGesture(edgePanGestureRecognizer, swipeType: .edge)\n    }\n    \n    func handleInteractivePanGesture(_ panGestureRecognizer: UIPanGestureRecognizer) {\n        handlePanGesture(panGestureRecognizer, swipeType: .pan)\n    }\n    \n    fileprivate func handlePanGesture(_ gesture: UIPanGestureRecognizer, swipeType: SwipeType) {\n        let translation = gesture.translation(in: view)\n        let velocity = gesture.velocity(in: view)\n        let percentage = min(1, max(0, translation.x / view.bounds.size.width))\n        \n        switch gesture.state {\n        case .began:\n            Const.performBlock {\n                if self.viewControllers.count < 2 { return }\n                self.isPaning = true\n                self.popViewController(animated: true)\n            }\n        case .changed:\n            Const.performBlock {\n                self.interactiveTransition.update(percentage)\n            }\n        case .ended, .failed, .possible, .cancelled:\n            Const.performBlock {\n                self.isPaning = false\n                if 0 < velocity.x && swipeType.threshold < percentage {\n                    self.interactiveTransition.finish()\n                } else {\n                    self.interactiveTransition.cancel()\n                }\n            }\n        }\n    }\n}\n\nextension HCNavigationController: UINavigationControllerDelegate {\n    public func navigationController(_ navigationController: UINavigationController, interactionControllerFor animationController: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? {\n        return isPaning ? interactiveTransition : nil\n    }\n    \n    public func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationControllerOperation, from fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {\n        //TODO: initial frame\n        switch (fromVC, toVC, isPaning) {\n        case (_ as HCRootViewController, _ as HCPagingViewController, _):\n            return HCRootAnimatedTransitioning(operation: operation)\n        case (_ as HCPagingViewController, _ as HCRootViewController, false):\n            return HCRootAnimatedTransitioning(operation: operation)\n        default:\n            return HCDefaultAnimatedTransitioning(operation: operation)\n        }\n    }\n}\n\nextension HCNavigationController: UIGestureRecognizerDelegate {\n    public func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {\n        if let gestureRecognizer = gestureRecognizer as? UIPanGestureRecognizer ,\n               gestureRecognizer === interactivePanGestureRecognizer &&\n               gestureRecognizer.velocity(in: navigationController?.view).x < 0 {\n            return false\n        }\n        return true\n    }\n    \n    public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRequireFailureOf otherGestureRecognizer: UIGestureRecognizer) -> Bool {\n        if gestureRecognizer === interactivePanGestureRecognizer &&\n           otherGestureRecognizer === interactiveEdgePanGestureRecognizer {\n            return true\n        }\n        return false\n    }\n}\n"
  },
  {
    "path": "HoverConversion/HCNavigationView.swift",
    "content": "//\n//  HCNavigationView.swift\n//  HoverConversion\n//\n//  Created by Taiki Suzuki on 2016/07/18.\n//  Copyright © 2016年 marty-suzuki. All rights reserved.\n//\n\nimport UIKit\nimport MisterFusion\n\npublic protocol HCNavigationViewDelegate: class {\n    func navigationView(_ navigationView: HCNavigationView, didTapLeftButton button: UIButton)\n    func navigationView(_ navigationView: HCNavigationView, didTapRightButton button: UIButton)\n}\n\nopen class HCNavigationView: UIView {\n    public struct ButtonPosition: OptionSet {\n        static let right = ButtonPosition(rawValue: 1 << 0)\n        static let left = ButtonPosition(rawValue: 1 << 1)\n        \n        public let rawValue: UInt\n        public init(rawValue: UInt) {\n            self.rawValue = rawValue\n        }\n    }\n    \n    open static let height: CGFloat = 64\n    \n    open var leftButton: UIButton?\n    open let titleLabel: UILabel = {\n        let label = UILabel(frame: .zero)\n        label.textAlignment = .center\n        label.font = UIFont.boldSystemFont(ofSize: 16)\n        return label\n    }()\n    open var rightButton: UIButton?\n    \n    weak var delegate: HCNavigationViewDelegate?\n    \n    public convenience init() {\n        self.init(buttonPosition: [])\n    }\n    \n    public init(buttonPosition: ButtonPosition) {\n        super.init(frame: .zero)\n        if buttonPosition.contains(.left) {\n            let leftButton = UIButton(type: .custom)\n            addLayoutSubview(leftButton, andConstraints:\n                leftButton.left,\n                leftButton.bottom,\n                leftButton.width |==| leftButton.height,\n                leftButton.height |==| 44\n            )\n            leftButton.setTitle(\"‹\", for: UIControlState())\n            leftButton.titleLabel?.font = .systemFont(ofSize: 40)\n            leftButton.addTarget(self, action: #selector(HCNavigationView.didTouchDown(_:)), for: .touchDown)\n            leftButton.addTarget(self, action: #selector(HCNavigationView.didTouchDragExit(_:)), for: .touchDragExit)\n            leftButton.addTarget(self, action: #selector(HCNavigationView.didTouchDragEnter(_:)), for: .touchDragEnter)\n            leftButton.addTarget(self, action: #selector(HCNavigationView.didTouchUpInside(_:)), for: .touchUpInside)\n            self.leftButton = leftButton\n        }\n        if buttonPosition.contains(.right) {\n            let rightButton = UIButton(type: .custom)\n            addLayoutSubview(rightButton, andConstraints:\n                rightButton.right,\n                rightButton.bottom,\n                rightButton.width |==| rightButton.height,\n                rightButton.height |==| 44\n            )\n            rightButton.addTarget(self, action: #selector(HCNavigationView.didTouchDown(_:)), for: .touchDown)\n            rightButton.addTarget(self, action: #selector(HCNavigationView.didTouchDragExit(_:)), for: .touchDragExit)\n            rightButton.addTarget(self, action: #selector(HCNavigationView.didTouchDragEnter(_:)), for: .touchDragEnter)\n            rightButton.addTarget(self, action: #selector(HCNavigationView.didTouchUpInside(_:)), for: .touchUpInside)\n            self.rightButton = rightButton\n        }\n        \n        var constraints: [MisterFusion] = []\n        if let leftButton = leftButton {\n            constraints += [leftButton.right |==| titleLabel.left]\n        } else {\n            constraints += [titleLabel.left |+| 44]\n        }\n        \n        if let rightButton = rightButton {\n            constraints += [rightButton.left |==| titleLabel.right]\n        } else {\n            constraints += [titleLabel.right |-| 44]\n        }\n        constraints += [\n            titleLabel.height |==| 44,\n            titleLabel.bottom\n        ]\n        addLayoutSubview(titleLabel, andConstraints: constraints)\n    }\n    \n    required public init?(coder aDecoder: NSCoder) {\n        fatalError(\"init(coder:) has not been implemented\")\n    }\n    \n    func didTouchUpInside(_ sender: UIButton) {\n        sender.alpha = 1\n        if sender == leftButton {\n            delegate?.navigationView(self, didTapLeftButton: sender)\n        } else if sender == rightButton {\n            delegate?.navigationView(self, didTapRightButton: sender)\n        }\n    }\n    \n    func didTouchDown(_ sender: UIButton) {\n        sender.alpha = 0.5\n    }\n    \n    func didTouchDragExit(_ sender: UIButton) {\n        sender.alpha = 0.5\n    }\n    \n    func didTouchDragEnter(_ sender: UIButton) {\n        sender.alpha = 1\n    }\n}\n"
  },
  {
    "path": "HoverConversion/HCNextHeaderView.swift",
    "content": "//\n//  HCNextHeaderView.swift\n//  HoverConversion\n//\n//  Created by Taiki Suzuki on 2016/09/13.\n//  Copyright © 2016年 marty-suzuki. All rights reserved.\n//\n\nimport UIKit\n\nopen class HCNextHeaderView: UIView {}\n"
  },
  {
    "path": "HoverConversion/HCPagingViewController.swift",
    "content": "//\n//  HCPagingViewController.swift\n//  HoverConversion\n//\n//  Created by Taiki Suzuki on 2016/07/18.\n//  Copyright © 2016年 marty-suzuki. All rights reserved.\n//\n\nimport UIKit\nimport MisterFusion\n\nfileprivate func < <T : Comparable>(lhs: T?, rhs: T?) -> Bool {\n  switch (lhs, rhs) {\n  case let (l?, r?):\n    return l < r\n  case (nil, _?):\n    return true\n  default:\n    return false\n  }\n}\n\nfileprivate func >= <T : Comparable>(lhs: T?, rhs: T?) -> Bool {\n  switch (lhs, rhs) {\n  case let (l?, r?):\n    return l >= r\n  default:\n    return !(lhs < rhs)\n  }\n}\n\npublic enum HCPagingPosition: Int {\n    case upper = 1, center = 0, lower = 2\n}\n\npublic protocol HCPagingViewControllerDataSource : class {\n    func pagingViewController(_ viewController: HCPagingViewController, viewControllerFor indexPath: IndexPath) -> HCContentViewController?\n    func pagingViewController(_ viewController: HCPagingViewController, nextHeaderViewFor indexPath: IndexPath) -> HCNextHeaderView?\n}\n\nopen class HCPagingViewController: UIViewController {\n    fileprivate struct Const {\n        static let fireDistance: CGFloat = 180\n        static let bottomTotalSpace = HCNavigationView.height\n        static let nextAnimationDuration: TimeInterval = 0.4\n        static let previousAnimationDuration: TimeInterval = 0.3\n        static fileprivate func calculateRudderBanding(_ distance: CGFloat, constant: CGFloat, dimension: CGFloat) -> CGFloat {\n            return (1 - (1 / ((distance * constant / dimension) + 1))) * dimension\n        }\n    }\n    \n    open fileprivate(set) var viewControllers: [HCPagingPosition : HCContentViewController?] = [\n        .upper : nil,\n        .center : nil,\n        .lower : nil\n    ]\n\n    let containerViews: [HCPagingPosition : UIView] = [\n        .upper : UIView(),\n        .center : UIView(),\n        .lower : UIView()\n    ]\n    \n    fileprivate var containerViewsAdded: Bool = false\n    var currentIndexPath: IndexPath\n    open fileprivate(set) var isPaging: Bool = false\n    fileprivate var isDragging: Bool = false\n    fileprivate var isPanning = false\n    fileprivate var beginningContentOffset: CGPoint = .zero\n    fileprivate(set) var scrollDirection: UITableViewScrollPosition = .none\n    \n    fileprivate var _alphaView: UIView?\n    fileprivate var alphaView: UIView {\n        let alphaView: UIView\n        if let _alphaView = _alphaView {\n            alphaView = _alphaView\n        } else {\n            alphaView = createAlphaViewAndAddSubview(containerViews[.center])\n            _alphaView = alphaView\n        }\n        return alphaView\n    }\n    \n    fileprivate var nextHeaderView: HCNextHeaderView?\n    \n    open weak var dataSource: HCPagingViewControllerDataSource? {\n        didSet {\n            addContainerViews()\n            setupViewControllers()\n        }\n    }\n    \n    public init(indexPath: IndexPath) {\n        self.currentIndexPath = indexPath\n        super.init(nibName: nil, bundle: nil)\n    }\n    \n    required public init?(coder aDecoder: NSCoder) {\n        fatalError(\"init(coder:) has not been implemented\")\n    }\n    \n    override open func viewDidLoad() {\n        super.viewDidLoad()\n\n        // Do any additional setup after loading the view.\n        automaticallyAdjustsScrollViewInsets = false\n        addContainerViews()\n    }\n    \n    open override var preferredStatusBarStyle : UIStatusBarStyle {\n        return viewController(.center)?.preferredStatusBarStyle ?? .default\n    }\n    \n    fileprivate func createAlphaViewAndAddSubview(_ view: UIView?) -> UIView {\n        let alphaView = UIView()\n        alphaView.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.6)\n        view?.addLayoutSubview(alphaView, andConstraints:\n            alphaView.top, alphaView.left, alphaView.bottom, alphaView.right\n        )\n        alphaView.isUserInteractionEnabled = false\n        alphaView.alpha = 0\n        return alphaView\n    }\n    \n    fileprivate func clearAlphaView() {\n        _alphaView?.removeFromSuperview()\n        _alphaView = nil\n    }\n    \n    fileprivate func clearNextHeaderView() {\n        nextHeaderView?.removeFromSuperview()\n        nextHeaderView = nil\n    }\n    \n    fileprivate func setScrollsTop() {\n        viewControllers.forEach { $0.1?.tableView?.scrollsToTop = $0.0 == .center }\n    }\n    \n    fileprivate func viewController(_ position: HCPagingPosition) -> HCContentViewController? {\n        guard let nullableViewController = viewControllers[position] else { return nil }\n        return nullableViewController\n    }\n    \n    fileprivate func setupViewControllers() {\n        setupViewController(indexPath: currentIndexPath.rowPlus(-1), position: .upper)\n        setupViewController(indexPath: currentIndexPath, position: .center)\n        setupViewController(indexPath: currentIndexPath.rowPlus(1), position: .lower)\n        setScrollsTop()\n        let tableView = viewController(.center)?.tableView\n        if let _ = viewController(.lower) {\n            tableView?.contentInset.bottom = Const.bottomTotalSpace\n            tableView?.scrollIndicatorInsets.bottom = Const.bottomTotalSpace\n        } else {\n            tableView?.contentInset.bottom = 0\n            tableView?.scrollIndicatorInsets.bottom = 0\n        }\n        setNeedsStatusBarAppearanceUpdate()\n    }\n    \n    fileprivate func setupViewController(indexPath: IndexPath, position: HCPagingPosition) {\n        if (indexPath as NSIndexPath).row < 0 || (indexPath as NSIndexPath).section < 0 { return }\n        guard\n            let vc = dataSource?.pagingViewController(self, viewControllerFor: indexPath)\n        else { return }\n        addViewController(vc, to: position)\n    }\n    \n    fileprivate func addViewController(_ viewController: HCContentViewController, to position: HCPagingPosition) {\n        viewController.scrollDelegate = self\n        addView(viewController.view, to: position)\n        addChildViewController(viewController)\n        viewController.didMove(toParentViewController: self)\n        viewControllers[position] = viewController\n    }\n    \n    fileprivate func addView(_ view: UIView, to position: HCPagingPosition) {\n        guard let containerView = containerViews[position] else { return }\n        containerView.addLayoutSubview(view, andConstraints:\n            view.top, view.right, view.left, view.bottom\n        )\n    }\n    \n    fileprivate func addContainerViews() {\n        if containerViewsAdded { return }\n        containerViewsAdded = true\n        containerViews.sorted { $0.0.rawValue < $1.0.rawValue }.forEach {\n            let misterFusion: MisterFusion\n            switch $0.0 {\n            case .upper: misterFusion = $0.1.bottom |==| view.top\n            case .center: misterFusion = $0.1.top\n            case .lower: misterFusion = $0.1.top |==| view.bottom\n            }\n            view.addLayoutSubview($0.1, andConstraints:\n                misterFusion, $0.1.height, $0.1.left, $0.1.right\n            )\n        }\n    }\n\n    override open func didReceiveMemoryWarning() {\n        super.didReceiveMemoryWarning()\n        // Dispose of any resources that can be recreated.\n    }\n    \n    func moveToNext(_ scrollView: UIScrollView, offset: CGPoint) {\n        guard let _ = viewController(.lower) , viewController(.center)?.canPaging[.next] == true else { return }\n\n        scrollDirection = .bottom\n        let value = offset.y - (scrollView.contentSize.height - scrollView.bounds.size.height)\n        let headerHeight = HCNavigationView.height\n        \n        isPaging = true\n        scrollView.setContentOffset(scrollView.contentOffset, animated: false)\n        \n        let relativeDuration = TimeInterval(0.25)\n        let lowerViewController = viewController(.lower)\n        let centerViewController = viewController(.center)\n        UIView.animateKeyframes(withDuration: Const.nextAnimationDuration, delay: 0, options: UIViewKeyframeAnimationOptions(), animations: {\n            \n            UIView.addKeyframe(withRelativeStartTime: 0, relativeDuration: 1.0 - relativeDuration) {\n                lowerViewController?.view.frame.origin.y = -self.view.bounds.size.height + headerHeight\n                centerViewController?.view.frame.origin.y = -self.view.bounds.size.height + value + headerHeight\n                centerViewController?.navigationView?.frame.origin.y = self.view.bounds.size.height - value - headerHeight\n                self.nextHeaderView?.alpha = 0\n            }\n            \n            UIView.addKeyframe(withRelativeStartTime: 1.0 - relativeDuration, relativeDuration: relativeDuration) {\n                lowerViewController?.view.frame.origin.y = -self.view.bounds.size.height\n                centerViewController?.view.frame.origin.y = -self.view.bounds.size.height + value\n            }\n        }) { _ in\n            let upperViewController = self.viewController(.upper)\n            upperViewController?.view.removeFromSuperview()\n            centerViewController?.view.removeFromSuperview()\n            lowerViewController?.view.removeFromSuperview()\n            \n            if let lowerView = lowerViewController?.view {\n                self.addView(lowerView, to: .center)\n            }\n            \n            if let centerView = centerViewController?.view {\n                self.addView(centerView, to: .upper)\n            }\n            \n            centerViewController?.scrollDelegate = nil\n            \n            upperViewController?.willMove(toParentViewController: self)\n            upperViewController?.removeFromParentViewController()\n            \n            let nextCenterVC = lowerViewController\n            let nextUpperVC = centerViewController\n            self.viewControllers[.center] = nextCenterVC\n            self.viewControllers[.upper] = nextUpperVC\n            self.viewControllers[.lower] = nil\n            \n            self.currentIndexPath = self.currentIndexPath.rowPlus(1)\n            if let newViewController = self.dataSource?.pagingViewController(self, viewControllerFor: self.currentIndexPath.rowPlus(1)) {\n                self.addViewController(newViewController, to: .lower)\n                self.viewControllers[.lower] = newViewController\n                nextCenterVC?.tableView.contentInset.bottom = Const.bottomTotalSpace\n                nextCenterVC?.tableView.scrollIndicatorInsets.bottom = Const.bottomTotalSpace\n            } else {\n                nextCenterVC?.tableView.contentInset.bottom = 0\n                nextCenterVC?.tableView.scrollIndicatorInsets.bottom = 0\n            }\n            \n            nextCenterVC?.scrollDelegate = self\n            \n            if nextUpperVC?.tableView?.contentOffset.y >= scrollView.contentSize.height - scrollView.bounds.size.height {\n                if scrollView.contentSize.height > scrollView.bounds.size.height {\n                    nextUpperVC?.tableView?.setContentOffset(CGPoint(x: 0, y: scrollView.contentSize.height - scrollView.bounds.size.height), animated: false)\n                } else {\n                    nextUpperVC?.tableView?.setContentOffset(.zero, animated: false)\n                }\n            }\n\n            nextUpperVC?.tableView?.reloadData()\n            self.setNeedsStatusBarAppearanceUpdate()\n            \n            self.setScrollsTop()\n            self.clearAlphaView()\n            self.clearNextHeaderView()\n            \n            self.isPaging = false\n        }\n    }\n    \n    func moveToPrevious(_ scrollView: UIScrollView, offset: CGPoint) {\n        guard let _ = viewController(.upper) , viewController(.center)?.canPaging[.prev] == true else { return }\n\n        scrollDirection = .top\n        isPaging = true\n        \n        scrollView.setContentOffset(scrollView.contentOffset, animated: false)\n        \n        let upperViewController = viewController(.upper)\n        let centerViewController = viewController(.center)\n        UIView.animate(withDuration: Const.previousAnimationDuration, delay: 0, options: .curveLinear, animations: {\n            upperViewController?.view.frame.origin.y = self.view.bounds.size.height\n            centerViewController?.view.frame.origin.y = self.view.bounds.size.height + offset.y\n        }) { finished in\n            let lowerViewController = self.viewController(.lower)\n            upperViewController?.view.removeFromSuperview()\n            centerViewController?.view.removeFromSuperview()\n            lowerViewController?.view.removeFromSuperview()\n            \n            if let upperView = upperViewController?.view {\n                self.addView(upperView, to: .center)\n            }\n            \n            if let centerView = centerViewController?.view {\n                self.addView(centerView, to: .lower)\n            }\n            \n            centerViewController?.scrollDelegate = nil\n            \n            lowerViewController?.willMove(toParentViewController: self)\n            lowerViewController?.removeFromParentViewController()\n            \n            let nextCenterVC = upperViewController\n            let nextLowerVC = centerViewController\n            self.viewControllers[.center] = nextCenterVC\n            self.viewControllers[.lower] = nextLowerVC\n            self.viewControllers[.upper] = nil\n            \n            self.currentIndexPath = self.currentIndexPath.rowPlus(-1)\n            if let newViewController = self.dataSource?.pagingViewController(self, viewControllerFor: self.currentIndexPath.rowPlus(-1)) {\n                self.addViewController(newViewController, to: .upper)\n                self.viewControllers[.upper] = newViewController\n            }\n            if let _ = nextLowerVC {\n                nextCenterVC?.tableView.contentInset.bottom = Const.bottomTotalSpace\n                nextCenterVC?.tableView.scrollIndicatorInsets.bottom = Const.bottomTotalSpace\n            } else {\n                nextCenterVC?.tableView.contentInset.bottom = 0\n                nextCenterVC?.tableView.scrollIndicatorInsets.bottom = 0\n            }\n            \n            nextCenterVC?.scrollDelegate = self\n            nextLowerVC?.tableView?.reloadData()\n            self.setNeedsStatusBarAppearanceUpdate()\n            \n            self.setScrollsTop()\n            self.clearAlphaView()\n            self.clearNextHeaderView()\n            \n            self.isPaging = false\n        }\n    }\n}\n\nextension HCPagingViewController: HCContentViewControllerScrollDelegate {\n    public func contentViewController(_ viewController: HCContentViewController, scrollViewDidScroll scrollView: UIScrollView) {\n        if isPanning { return }\n        \n        guard viewController == self.viewController(.center) else { return }\n        \n        let offset = scrollView.contentOffset\n        let contentSize = scrollView.contentSize\n        let scrollViewSize = scrollView.bounds.size\n        if contentSize.height - scrollViewSize.height <= offset.y {\n            guard let lowerViewController = self.viewController(.lower) else { return }\n            let delta = offset.y - (contentSize.height - scrollViewSize.height)\n            lowerViewController.view.frame.origin.y = min(0, -delta)\n            let value: CGFloat = scrollView.bottomBounceSize\n            if value > Const.bottomTotalSpace {\n                let alpha = min(1, max(0, (value - Const.bottomTotalSpace) / Const.fireDistance))\n                alphaView.alpha = alpha\n            }\n            \n            if let _ = self.nextHeaderView {\n            } else if let view = self.viewController(.lower)?.view,\n                      let nhv = dataSource?.pagingViewController(self, nextHeaderViewFor: currentIndexPath.rowPlus(1)) {\n                view.addLayoutSubview(nhv, andConstraints:\n                    nhv.top, nhv.right, nhv.left, nhv.height |==| HCNavigationView.height\n                )\n                self.nextHeaderView = nhv\n            }\n        } else if offset.y < 0 {\n            guard\n                let upperViewController = self.viewController(.upper),\n                let centerViewController = self.viewController(.center)\n            else { return }\n            let delta = max(0, -offset.y)\n            if (currentIndexPath as NSIndexPath).row > 0 {\n                let alpha = min(1, max(0, -offset.y / Const.fireDistance))\n                alphaView.alpha = alpha\n            }\n            clearNextHeaderView()\n            upperViewController.view.frame.origin.y = delta\n            centerViewController.navigationView.frame.origin.y = delta\n        } else {\n            viewControllers[.lower]??.view.frame.origin.y = 0\n            viewControllers[.upper]??.view.frame.origin.y = 0\n            viewControllers[.center]??.navigationView.frame.origin.y = 0\n            \n            clearAlphaView()\n            clearNextHeaderView()\n        }\n        \n        if isDragging { return }\n        if scrollView.contentSize.height > scrollView.bounds.size.height {\n            if offset.y < -Const.fireDistance {\n                moveToPrevious(scrollView, offset: offset)\n            } else if offset.y > (scrollView.contentSize.height + Const.fireDistance) - scrollView.bounds.size.height {\n                moveToNext(scrollView, offset: offset)\n            }\n        } else {\n            if offset.y < -Const.fireDistance {\n                moveToPrevious(scrollView, offset: offset)\n            } else if offset.y > Const.fireDistance {\n                moveToNext(scrollView, offset: CGPoint(x: offset.x, y: offset.y + (scrollView.contentSize.height - scrollView.bounds.size.height)))\n            }\n        }\n    }\n    \n    public func contentViewController(_ viewController: HCContentViewController, scrollViewWillBeginDragging scrollView: UIScrollView) {\n        guard viewController == self.viewController(.center) else { return }\n        isDragging = true\n    }\n    \n    public func contentViewController(_ viewController: HCContentViewController, scrollViewDidEndDragging scrollView: UIScrollView, willDecelerate decelerate: Bool) {\n        guard viewController == self.viewController(.center) else { return }\n        isDragging = false\n    }\n    \n    public func contentViewController(_ viewController: HCContentViewController, handlePanGesture gesture: UIPanGestureRecognizer) {\n        guard let centerViewController = self.viewController(.center)\n        , centerViewController == viewController && (currentIndexPath as NSIndexPath).row > 0 && viewController.canPaging[.prev]\n        else { return }\n        \n        let translation = gesture.translation(in: view)\n        let velocity = gesture.velocity(in: view)\n        let tableView = viewController.tableView\n        \n        switch gesture.state {\n        case .began:\n            isPanning = true\n            beginningContentOffset = (tableView?.contentOffset)!\n            \n        case .changed:\n            let position = max(0, translation.y)\n            let rudderBanding = Const.calculateRudderBanding(position, constant: 0.55, dimension: view.frame.size.height)\n            \n            let headerPosition = max(0, rudderBanding)\n            if viewController.navigationView.frame.origin.y != headerPosition {\n                viewController.navigationView.frame.origin.y = headerPosition\n            }\n            \n           let tableViewOffset = beginningContentOffset.y - max(0, rudderBanding)\n            tableView?.setContentOffset(CGPoint(x: 0, y: tableViewOffset), animated: false)\n            \n            self.viewController(.upper)?.view.frame.origin.y = headerPosition\n            \n            alphaView.alpha = min(1, (rudderBanding / Const.fireDistance))\n            \n        case .cancelled, .ended:\n            if velocity.y  > 0 && translation.y > Const.fireDistance && (currentIndexPath as NSIndexPath).row > 0 {\n                isPanning = false\n                let rudderBanding = Const.calculateRudderBanding(max(0, translation.y), constant: 0.55, dimension: view.frame.size.height)\n                moveToPrevious(tableView!, offset: CGPoint(x: 0, y: -rudderBanding))\n            } else {\n                UIView.animate(withDuration: 0.25, animations: {\n                    viewController.navigationView.frame.origin.y = 0\n                    self.viewController(.upper)?.view.frame.origin.y = 0\n                    tableView?.setContentOffset(self.beginningContentOffset, animated: false)\n                    self.alphaView.alpha = 0\n                }, completion: { finished in\n                    self.beginningContentOffset = .zero\n                    self.isPanning = false\n                }) \n            }\n            \n        case .failed, .possible:\n            break\n        }\n    }\n}\n"
  },
  {
    "path": "HoverConversion/HCRootAnimatedTransitioning.swift",
    "content": "//\n//  HCRootAnimatedTransitioning.swift\n//\n//  Created by Taiki Suzuki on 2016/09/11.\n//  Copyright © 2016年 marty-suzuki. All rights reserved.\n//\n//\n\nimport UIKit\n\nclass HCRootAnimatedTransitioning: NSObject, UIViewControllerAnimatedTransitioning {\n    fileprivate struct Const {\n        static let duration: TimeInterval = 0.3\n        static let scaling: CGFloat = 0.95\n    }\n    \n    let operation: UINavigationControllerOperation\n    fileprivate let alphaView = UIView()\n    \n    init(operation: UINavigationControllerOperation) {\n        self.operation = operation\n        super.init()\n    }\n    \n    @objc func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval {\n        return Const.duration\n    }\n    // This method can only  be a nop if the transition is interactive and not a percentDriven interactive transition.\n    @objc func animateTransition(using transitionContext: UIViewControllerContextTransitioning) {\n        guard\n            let toVC = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.to),\n            let fromVC = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.from)\n        else {\n            transitionContext.completeTransition(true)\n            return\n        }\n        \n        let containerView = transitionContext.containerView\n        containerView.backgroundColor = .black\n        alphaView.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.5)\n        alphaView.frame = containerView.bounds\n        \n        switch operation {\n        case .pop: popAnimation(transitionContext, toVC: toVC, fromVC: fromVC, containerView: containerView)\n        case .push: pushAnimation(transitionContext, toVC: toVC, fromVC: fromVC, containerView: containerView)\n        case .none:\n            transitionContext.completeTransition(true)\n            break\n        }\n    }\n    \n    fileprivate func popAnimation(_ transitionContext: UIViewControllerContextTransitioning, toVC: UIViewController, fromVC: UIViewController, containerView: UIView) {\n        containerView.insertSubview(toVC.view, belowSubview: fromVC.view)\n        containerView.insertSubview(alphaView, belowSubview: fromVC.view)\n        \n        var initialFrame: CGRect?\n        if let rootVC = toVC as? HCRootViewController, let pagingVC = fromVC as? HCPagingViewController {\n            let indexPath = pagingVC.currentIndexPath\n            if rootVC.tableView?.cellForRow(at: indexPath as IndexPath) == nil {\n                rootVC.tableView?.scrollToRow(at: indexPath as IndexPath, at: pagingVC.scrollDirection, animated: false)\n            }\n            \n            if let cell = rootVC.tableView?.cellForRow(at: indexPath as IndexPath) {\n                if let nullableVC = pagingVC.viewControllers[.center], let centeVC = nullableVC {\n                    centeVC.cellImageView.frame = cell.bounds\n                    centeVC.cellImageView.image = cell.screenshot()\n                }\n                \n                if let superview = rootVC.view,\n                   let point = cell.superview?.convert(cell.frame.origin, to: superview) {\n                    var selectedCellFrame: CGRect = .zero\n                    selectedCellFrame.origin = point\n                    selectedCellFrame.size = cell.bounds.size\n                    initialFrame = selectedCellFrame\n                }\n            }\n            \n            rootVC.tableView?.selectRow(at: indexPath as IndexPath, animated: true, scrollPosition: .none)\n        }\n        \n        fromVC.view.clipsToBounds = true\n        alphaView.alpha = 1\n        toVC.view.transform = CGAffineTransform(scaleX: Const.scaling, y: Const.scaling)\n        \n        UIView.animateKeyframes(withDuration: transitionDuration(using: transitionContext) , delay: 0, options: UIViewKeyframeAnimationOptions(), animations: {\n            UIView.addKeyframe(withRelativeStartTime: 0, relativeDuration: 0.25) {\n                (fromVC as? HCPagingViewController)?.viewControllers[.center]??.cellImageView.alpha = 1\n            }\n            UIView.addKeyframe(withRelativeStartTime: 0.5, relativeDuration: 0.25) {\n                (fromVC as? HCPagingViewController)?.containerViews[.center]?.alpha = 0\n            }\n            UIView.addKeyframe(withRelativeStartTime: 0, relativeDuration: 1) {\n                if let initialFrame = initialFrame {\n                    fromVC.view.frame = initialFrame\n                }\n                fromVC.view.layoutIfNeeded()\n                toVC.view.transform = CGAffineTransform.identity\n                self.alphaView.alpha = 0\n            }\n        }) { finished in\n            let canceled = transitionContext.transitionWasCancelled\n            if canceled {\n                toVC.view.removeFromSuperview()\n            } else {\n                fromVC.view.removeFromSuperview()\n                fromVC.view.clipsToBounds = false\n            }\n            \n            toVC.view.transform = CGAffineTransform.identity\n            self.alphaView.removeFromSuperview()\n            \n            if let pagingVC = fromVC as? HCPagingViewController, let rootVC = toVC as? HCRootViewController {\n                let indexPath = pagingVC.currentIndexPath\n                rootVC.tableView?.deselectRow(at: indexPath as IndexPath, animated: true)\n            }\n            transitionContext.completeTransition(!canceled)\n        }\n    }\n    \n    fileprivate func pushAnimation(_ transitionContext: UIViewControllerContextTransitioning, toVC: UIViewController, fromVC: UIViewController, containerView: UIView) {\n        containerView.addSubview(alphaView)\n        containerView.addSubview(toVC.view)\n        \n        toVC.view.clipsToBounds = true\n        \n        var earlyAlphaAnimation = false\n        if let rootVC = fromVC as? HCRootViewController, let pagingVC = toVC as? HCPagingViewController {\n            let indexPath = pagingVC.currentIndexPath\n            if let cell = rootVC.tableView?.cellForRow(at: indexPath as IndexPath) {\n                if let nullableVC = pagingVC.viewControllers[.center], let centeVC = nullableVC {\n                    centeVC.cellImageView.frame = cell.bounds\n                    centeVC.cellImageView.image = cell.screenshot()\n                }\n                if let superview = rootVC.view,\n                   let point = cell.superview?.convert(cell.frame.origin, to: superview) {\n                    var selectedCellFrame: CGRect = .zero\n                    selectedCellFrame.origin = point\n                    selectedCellFrame.size = cell.bounds.size\n                    toVC.view.frame = selectedCellFrame\n                }\n                if let superview = rootVC.view,\n                   let point = cell.superview?.convert(cell.frame.origin, to: superview) , point.y < containerView.bounds.size.height / 3 {\n                    earlyAlphaAnimation = true\n                }\n            }\n        }\n        alphaView.alpha = 0\n        \n        let relativeStartTime = earlyAlphaAnimation ? 0 : 0.25\n        UIView.animateKeyframes(withDuration: transitionDuration(using: transitionContext), delay: 0, options: UIViewKeyframeAnimationOptions(), animations: {\n            UIView.addKeyframe(withRelativeStartTime: 0, relativeDuration: 1) {\n                toVC.view.frame = containerView.bounds\n                fromVC.view.transform = CGAffineTransform(scaleX: Const.scaling, y: Const.scaling)\n                self.alphaView.alpha = 1\n            }\n            UIView.addKeyframe(withRelativeStartTime: relativeStartTime, relativeDuration: 0.5) {\n                (toVC as? HCPagingViewController)?.viewControllers[.center]??.cellImageView.alpha = 0\n            }\n        }) { finished in\n            let canceled = transitionContext.transitionWasCancelled\n            if canceled {\n                toVC.view.removeFromSuperview()\n                toVC.view.clipsToBounds = false\n            }\n            \n            self.alphaView.removeFromSuperview()\n            fromVC.view.transform = CGAffineTransform.identity\n            \n            transitionContext.completeTransition(!canceled)\n        }\n    }\n}\n"
  },
  {
    "path": "HoverConversion/HCRootViewController.swift",
    "content": "//\n//  HCRootViewController.swift\n//  HoverConversion\n//\n//  Created by Taiki Suzuki on 2016/07/18.\n//  Copyright © 2016年 marty-suzuki. All rights reserved.\n//\n\nimport UIKit\n\nopen class HCRootViewController: UIViewController, HCViewControllable {\n\n    open var tableView: UITableView! = UITableView()\n    open var navigatoinContainerView: UIView! = UIView()\n    open var navigationView: HCNavigationView! = HCNavigationView()\n    \n    open override var title: String? {\n        didSet {\n            navigationView?.titleLabel.text = title\n        }\n    }\n    \n    override open func viewDidLoad() {\n        super.viewDidLoad()\n\n        // Do any additional setup after loading the view.\n        addViews()\n        automaticallyAdjustsScrollViewInsets = false\n        navigationController?.setNavigationBarHidden(true, animated: false)\n    }\n\n    override open func didReceiveMemoryWarning() {\n        super.didReceiveMemoryWarning()\n        // Dispose of any resources that can be recreated.\n    }\n}\n"
  },
  {
    "path": "HoverConversion/HCViewContentable.swift",
    "content": "//\n//  HCViewContentable.swift\n//  HoverConversion\n//\n//  Created by Taiki Suzuki on 2016/07/18.\n//  Copyright © 2016年 marty-suzuki. All rights reserved.\n//\n\nimport UIKit\nimport MisterFusion\n\npublic protocol HCViewControllable: HCNavigationViewDelegate {\n    var navigationView: HCNavigationView! { get set }\n    var navigatoinContainerView: UIView! { get set }\n    var tableView: UITableView! { get set }\n    func addViews()\n}\n\nextension HCViewControllable where Self: UIViewController {\n    public func addViews() {\n        navigationView.delegate = self\n        view.addLayoutSubview(navigatoinContainerView, andConstraints:\n            navigatoinContainerView.top,\n            navigatoinContainerView.right,\n            navigatoinContainerView.left,\n            navigatoinContainerView.height |==| HCNavigationView.height\n        )\n        \n        navigatoinContainerView.addLayoutSubview(navigationView, andConstraints:\n            navigationView.top,\n            navigationView.right,\n            navigationView.left,\n            navigationView.bottom\n        )\n        \n        view.addLayoutSubview(tableView, andConstraints:\n            tableView.top |==| navigatoinContainerView.bottom,\n            tableView.right,\n            tableView.left,\n            tableView.bottom\n        )\n        view.bringSubview(toFront: navigatoinContainerView)\n    }\n    \n    public func navigationView(_ navigationView: HCNavigationView, didTapLeftButton button: UIButton) {}\n    public func navigationView(_ navigationView: HCNavigationView, didTapRightButton button: UIButton) {}\n}\n\npublic protocol HCViewContentable: HCViewControllable {\n    weak var scrollDelegate: HCContentViewControllerScrollDelegate? { get set }\n}\n"
  },
  {
    "path": "HoverConversion/NSIndexPath+Row.swift",
    "content": "//\n//  NSIndexPath+Row.swift\n//  HoverConversion\n//\n//  Created by Taiki Suzuki on 2016/09/11.\n//  Copyright © 2016年 marty-suzuki. All rights reserved.\n//\n//\n\nimport Foundation\n\nextension IndexPath {\n    func rowPlus(_ value: Int) -> IndexPath {\n        return IndexPath(row: row + value, section: section)\n    }\n}\n"
  },
  {
    "path": "HoverConversion/UIScrollView+BottomBounceSize.swift",
    "content": "//\n//  UIScrollView+BottomBounceSize.swift\n//  HoverConversion\n//\n//  Created by Taiki Suzuki on 2016/09/12.\n//  Copyright © 2016年 marty-suzuki. All rights reserved.\n//\n\nimport UIKit\n\nextension UIScrollView {\n    var bottomBounceSize: CGFloat {\n        if bounds.size.height < contentSize.height {\n            return contentOffset.y - (contentSize.height - bounds.size.height)\n        } else {\n            return contentOffset.y\n        }\n    }\n}"
  },
  {
    "path": "HoverConversion/UITableViewCell+Screenshot.swift",
    "content": "//\n//  UITableViewCell+Screenshot.swift\n//  HoverConversion\n//\n//  Created by Taiki Suzuki on 2016/09/08.\n//  Copyright © 2016年 marty-suzuki. All rights reserved.\n//\n\nimport UIKit\n\nextension UITableViewCell {\n    func screenshot(_ scale: CGFloat = UIScreen.main.scale) -> UIImage? {\n        UIGraphicsBeginImageContextWithOptions(bounds.size, false, scale)\n        drawHierarchy(in: self.bounds, afterScreenUpdates: true)\n        let image = UIGraphicsGetImageFromCurrentImageContext()\n        UIGraphicsEndImageContext()\n        return image\n    }\n}\n"
  },
  {
    "path": "HoverConversion.podspec",
    "content": "#\n# Be sure to run `pod lib lint HoverConversion.podspec' to ensure this is a\n# valid spec before submitting.\n#\n# Any lines starting with a # are optional, but their use is encouraged\n# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html\n#\n\nPod::Spec.new do |s|\n  s.name             = 'HoverConversion'\n  s.version          = '0.3.1'\n  s.summary          = 'HoverConversion realized vertical paging. UIViewController will be paging when reaching top or bottom of UITableView content.'\n\n# This description is used to generate tags and improve search results.\n#   * Think: What does it do? Why did you write it? What is the focus?\n#   * Try to keep it short, snappy and to the point.\n#   * Write the description between the DESC delimiters below.\n#   * Finally, don't worry about the indent, CocoaPods strips it!\n\n#  s.description      = <<-DESC\n# TODO: Add long description of the pod here.\n#                       DESC\n\n  s.homepage         = 'https://github.com/marty-suzuki/HoverConversion'\n  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'\n  s.license          = { :type => 'MIT', :file => 'LICENSE' }\n  s.author           = { 'marty-suzuki' => 's1180183@gmail.com' }\n  s.source           = { :git => 'https://github.com/marty-suzuki/HoverConversion.git', :tag => s.version.to_s }\n  s.social_media_url = 'https://twitter.com/marty_suzuki'\n\n  s.ios.deployment_target = '8.0'\n\n  s.source_files = 'HoverConversion/*.{swift}'\n\n  # s.resource_bundles = {\n  #   'HoverConversion' => ['HoverConversion/Assets/*.png']\n  # }\n\n  # s.public_header_files = 'Pod/Classes/**/*.h'\n  s.frameworks = 'UIKit'\n  s.dependency 'MisterFusion', '~> 2.0.0'\n  # s.dependency 'AFNetworking', '~> 2.3'\nend\n"
  },
  {
    "path": "HoverConversionSample/HoverConversionSample/AppDelegate.swift",
    "content": "//\n//  AppDelegate.swift\n//  HoverConversionSample\n//\n//  Created by Taiki Suzuki on 2016/07/18.\n//  Copyright © 2016年 marty-suzuki. All rights reserved.\n//\n\nimport UIKit\nimport Fabric\nimport TwitterKit\nimport TouchVisualizer\n\n@UIApplicationMain\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n\n    var window: UIWindow?\n\n    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {\n        // Override point for customization after application launch.\n        Fabric.with([Twitter.self])\n        Visualizer.start()\n        return true\n    }\n\n    func applicationWillResignActive(_ application: UIApplication) {\n        // 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.\n        // 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.\n    }\n\n    func applicationDidEnterBackground(_ application: UIApplication) {\n        // 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.\n        // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.\n        Visualizer.stop()\n    }\n\n    func applicationWillEnterForeground(_ application: UIApplication) {\n        // 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.\n        Visualizer.start()\n    }\n\n    func applicationDidBecomeActive(_ application: UIApplication) {\n        // 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.\n        Visualizer.start()\n    }\n\n    func applicationWillTerminate(_ application: UIApplication) {\n        // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.\n        Visualizer.stop()\n    }\n}\n"
  },
  {
    "path": "HoverConversionSample/HoverConversionSample/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"60x60\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"60x60\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"76x76\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"76x76\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"83.5x83.5\",\n      \"scale\" : \"2x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "HoverConversionSample/HoverConversionSample/Base.lproj/LaunchScreen.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<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\">\n    <dependencies>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"8122\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"EHf-IW-A2E\">\n            <objects>\n                <viewController id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"Llm-lL-Icb\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"xb3-aO-Qok\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Ze5-6b-2t3\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"600\" height=\"600\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <animations/>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"calibratedWhite\"/>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"53\" y=\"375\"/>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "HoverConversionSample/HoverConversionSample/Base.lproj/Main.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"10117\" systemVersion=\"15G31\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" initialViewController=\"pgx-Hw-LRH\">\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"10085\"/>\n    </dependencies>\n    <scenes>\n        <!--Navigation Controller-->\n        <scene sceneID=\"c9q-fL-NSW\">\n            <objects>\n                <navigationController id=\"pgx-Hw-LRH\" customClass=\"HCNavigationController\" customModule=\"HoverConversion\" sceneMemberID=\"viewController\">\n                    <navigationBar key=\"navigationBar\" contentMode=\"scaleToFill\" id=\"qlo-WV-cEu\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"320\" height=\"44\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                    </navigationBar>\n                    <connections>\n                        <segue destination=\"BYZ-38-t0r\" kind=\"relationship\" relationship=\"rootViewController\" id=\"vk6-jI-zkd\"/>\n                    </connections>\n                </navigationController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"dYi-6h-jC2\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-72\" y=\"215\"/>\n        </scene>\n        <!--Home View Controller-->\n        <scene sceneID=\"tne-QT-ifu\">\n            <objects>\n                <viewController id=\"BYZ-38-t0r\" customClass=\"HomeViewController\" customModule=\"HoverConversionSample\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"y3c-jy-aDJ\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"wfy-db-euE\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"8bC-Xf-vdC\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"600\" height=\"600\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"calibratedWhite\"/>\n                    </view>\n                    <navigationItem key=\"navigationItem\" id=\"lmn-Z2-ewH\"/>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"dkx-z0-nzr\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"660\" y=\"215\"/>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "HoverConversionSample/HoverConversionSample/Cell/HomeTableViewCell.swift",
    "content": "//\n//  HomeTableViewCell.swift\n//  HoverConversionSample\n//\n//  Created by Taiki Suzuki on 2016/09/04.\n//  Copyright © 2016年 marty-suzuki. All rights reserved.\n//\n\nimport UIKit\nimport TwitterKit\n\nclass HomeTableViewCell: UITableViewCell, IconImageViewLoadable {\n    static let Height: CGFloat = 80\n    \n    @IBOutlet weak var iconImageView: UIImageView!\n    @IBOutlet weak var userNameLabel: UILabel!\n    @IBOutlet weak var screenNameLabel: UILabel!\n    @IBOutlet weak var latestTweetLabel: UILabel!\n    @IBOutlet weak var timestampLabel: UILabel!\n    \n    var userValue: (TWTRUser, TWTRTweet)? {\n        didSet {\n            guard let value = userValue else { return }\n            let user = value.0\n            if let url = URL(string: user.profileImageLargeURL) {\n                loadImage(url)\n            }\n            userNameLabel.text = user.name\n            screenNameLabel.text = \"@\" + user.screenName\n            let tweet = value.1\n            latestTweetLabel.text = tweet.text\n            timestampLabel.text = tweet.createdAt.description\n        }\n    }\n    \n    override func awakeFromNib() {\n        super.awakeFromNib()\n        // Initialization code\n        iconImageView.layer.cornerRadius = iconImageView.bounds.size.height / 2\n        iconImageView.layer.borderWidth = 1\n        iconImageView.layer.borderColor = UIColor.lightGray.cgColor\n        iconImageView.layer.masksToBounds = true\n    }\n\n    override func setSelected(_ selected: Bool, animated: Bool) {\n        super.setSelected(selected, animated: animated)\n\n        // Configure the view for the selected state\n    }\n}\n"
  },
  {
    "path": "HoverConversionSample/HoverConversionSample/Cell/HomeTableViewCell.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"10117\" systemVersion=\"15G31\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\">\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"10085\"/>\n    </dependencies>\n    <objects>\n        <placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File's Owner\"/>\n        <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>\n        <tableViewCell contentMode=\"scaleToFill\" selectionStyle=\"default\" indentationWidth=\"10\" id=\"KGk-i7-Jjw\" customClass=\"HomeTableViewCell\" customModule=\"HoverConversionSample\" customModuleProvider=\"target\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"320\" height=\"80\"/>\n            <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n            <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"KGk-i7-Jjw\" id=\"H2p-sc-9uM\">\n                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"320\" height=\"79.5\"/>\n                <autoresizingMask key=\"autoresizingMask\"/>\n                <subviews>\n                    <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleToFill\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"FXZ-DM-Ur9\">\n                        <rect key=\"frame\" x=\"10\" y=\"10\" width=\"60\" height=\"60\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"height\" constant=\"60\" id=\"P7M-Eo-cP0\"/>\n                            <constraint firstAttribute=\"width\" constant=\"60\" id=\"RnD-YV-LY6\"/>\n                        </constraints>\n                    </imageView>\n                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"UserName\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"mfI-M1-VK4\">\n                        <rect key=\"frame\" x=\"78\" y=\"10\" width=\"77\" height=\"19.5\"/>\n                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"16\"/>\n                        <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                        <nil key=\"highlightedColor\"/>\n                    </label>\n                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"@ScreenName\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"lwd-HG-mKy\">\n                        <rect key=\"frame\" x=\"78\" y=\"31\" width=\"83.5\" height=\"14.5\"/>\n                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                        <color key=\"textColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                        <nil key=\"highlightedColor\"/>\n                    </label>\n                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Tweet\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"AEX-cR-12k\">\n                        <rect key=\"frame\" x=\"78\" y=\"55.5\" width=\"34\" height=\"14.5\"/>\n                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                        <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                        <nil key=\"highlightedColor\"/>\n                    </label>\n                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"12:00\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"bnn-23-jUq\">\n                        <rect key=\"frame\" x=\"285.5\" y=\"10\" width=\"26.5\" height=\"12\"/>\n                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"10\"/>\n                        <color key=\"textColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                        <nil key=\"highlightedColor\"/>\n                    </label>\n                </subviews>\n                <constraints>\n                    <constraint firstItem=\"FXZ-DM-Ur9\" firstAttribute=\"leading\" secondItem=\"H2p-sc-9uM\" secondAttribute=\"leading\" constant=\"10\" id=\"2Lh-V3-xco\"/>\n                    <constraint firstAttribute=\"trailing\" relation=\"greaterThanOrEqual\" secondItem=\"lwd-HG-mKy\" secondAttribute=\"trailing\" constant=\"12\" id=\"2Yt-9F-YjA\"/>\n                    <constraint firstAttribute=\"trailing\" relation=\"greaterThanOrEqual\" secondItem=\"AEX-cR-12k\" secondAttribute=\"trailing\" constant=\"12\" id=\"4QV-vG-jVP\"/>\n                    <constraint firstAttribute=\"trailing\" secondItem=\"bnn-23-jUq\" secondAttribute=\"trailing\" constant=\"8\" id=\"4ci-M4-iaY\"/>\n                    <constraint firstItem=\"mfI-M1-VK4\" firstAttribute=\"leading\" secondItem=\"FXZ-DM-Ur9\" secondAttribute=\"trailing\" constant=\"8\" id=\"7S9-V7-GsX\"/>\n                    <constraint firstItem=\"mfI-M1-VK4\" firstAttribute=\"top\" secondItem=\"FXZ-DM-Ur9\" secondAttribute=\"top\" id=\"8iv-eM-gwE\"/>\n                    <constraint firstItem=\"lwd-HG-mKy\" firstAttribute=\"top\" secondItem=\"mfI-M1-VK4\" secondAttribute=\"bottom\" constant=\"2\" id=\"Dz7-ql-1sH\"/>\n                    <constraint firstItem=\"AEX-cR-12k\" firstAttribute=\"bottom\" secondItem=\"FXZ-DM-Ur9\" secondAttribute=\"bottom\" id=\"EPE-vP-UuS\"/>\n                    <constraint firstItem=\"bnn-23-jUq\" firstAttribute=\"top\" secondItem=\"H2p-sc-9uM\" secondAttribute=\"top\" constant=\"10\" id=\"SzQ-cD-IQD\"/>\n                    <constraint firstItem=\"FXZ-DM-Ur9\" firstAttribute=\"centerY\" secondItem=\"H2p-sc-9uM\" secondAttribute=\"centerY\" id=\"T1Q-Gl-IKP\"/>\n                    <constraint firstItem=\"AEX-cR-12k\" firstAttribute=\"leading\" secondItem=\"FXZ-DM-Ur9\" secondAttribute=\"trailing\" constant=\"8\" id=\"jDb-AP-XyI\"/>\n                    <constraint firstItem=\"bnn-23-jUq\" firstAttribute=\"leading\" relation=\"greaterThanOrEqual\" secondItem=\"mfI-M1-VK4\" secondAttribute=\"trailing\" constant=\"8\" id=\"wwc-ve-Wto\"/>\n                    <constraint firstItem=\"lwd-HG-mKy\" firstAttribute=\"leading\" secondItem=\"mfI-M1-VK4\" secondAttribute=\"leading\" id=\"xKK-Yt-UDg\"/>\n                </constraints>\n            </tableViewCellContentView>\n            <connections>\n                <outlet property=\"iconImageView\" destination=\"FXZ-DM-Ur9\" id=\"FvV-nQ-Zqg\"/>\n                <outlet property=\"latestTweetLabel\" destination=\"AEX-cR-12k\" id=\"81e-rX-kC7\"/>\n                <outlet property=\"screenNameLabel\" destination=\"lwd-HG-mKy\" id=\"Z9z-Kb-gms\"/>\n                <outlet property=\"timestampLabel\" destination=\"bnn-23-jUq\" id=\"Cb4-Tp-CsV\"/>\n                <outlet property=\"userNameLabel\" destination=\"mfI-M1-VK4\" id=\"3am-YQ-st6\"/>\n            </connections>\n        </tableViewCell>\n    </objects>\n</document>\n"
  },
  {
    "path": "HoverConversionSample/HoverConversionSample/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n\t<key>Fabric</key>\n\t<dict>\n\t\t<key>APIKey</key>\n\t\t<string>17f9b693790022f676a0812ed5b69bf3f93d01ff</string>\n\t\t<key>Kits</key>\n\t\t<array>\n\t\t\t<dict>\n\t\t\t\t<key>KitInfo</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>consumerKey</key>\n\t\t\t\t\t<string>Tqg8V7zKdLsQyEl5V01o80kLj</string>\n\t\t\t\t\t<key>consumerSecret</key>\n\t\t\t\t\t<string>cMRzcgG08gsYahpLf6RAltA91WvFAQJvGRJ5wi2OK9U5JkYmKi</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>KitName</key>\n\t\t\t\t<string>Twitter</string>\n\t\t\t</dict>\n\t\t</array>\n\t</dict>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>UIMainStoryboardFile</key>\n\t<string>Main</string>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>armv7</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations~ipad</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationPortraitUpsideDown</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "HoverConversionSample/HoverConversionSample/Manager/TwitterManager.swift",
    "content": "//\n//  TwitterManager.swift\n//  HoverConversionSample\n//\n//  Created by Taiki Suzuki on 2016/09/03.\n//  Copyright © 2016年 marty-suzuki. All rights reserved.\n//\n\nimport Foundation\nimport TwitterKit\n\nclass TwitterManager {\n    fileprivate let screenNames: [String] = [\n        \"tim_cook\",\n        \"SwiftLang\",\n        \"BacktotheFuture\",\n        \"realmikefox\",\n        \"marty_suzuki\"\n    ]\n    \n    fileprivate(set) var tweets: [String : [TWTRTweet]] = [:]\n    fileprivate(set) var users: [TWTRUser] = []\n    \n    fileprivate lazy var client = TWTRAPIClient()\n    \n    func sortUsers() {\n        let result = users.flatMap { user -> (TWTRUser, TWTRTweet)? in\n            guard let tweet = tweets[user.screenName]?.first else {\n                return nil\n            }\n            return (user, tweet)\n        }\n        let sortedResult = result.sorted { $0.0.1.createdAt.timeIntervalSince1970 > $0.1.1.createdAt.timeIntervalSince1970 }\n        users = sortedResult.flatMap { $0.0 }\n    }\n    \n    func fetchUsersTimeline(_ completion: @escaping (() -> ())) {\n        let group = DispatchGroup()\n        screenNames.forEach {\n            group.enter()\n            fetchUserTimeline(screenName: $0) {\n                group.leave()\n            }\n        }\n        group.notify(queue: DispatchQueue.main) {\n            completion()\n        }\n    }\n    \n    func fetchUserTimeline(screenName: String, completion: @escaping (() -> ())) {\n        let request = StatusesUserTimelineRequest(screenName: screenName, maxId: nil, count: 1)\n        client.sendTwitterRequest(request) { [weak self] in\n            switch $0.result {\n            case .success(let tweets):\n                guard let userTweets = self?.tweets[screenName] else {\n                    self?.tweets[screenName] = tweets\n                    completion()\n                    return\n                }\n                self?.tweets[screenName] = Array([userTweets, tweets].joined())\n            case .failure(let error):\n                print(error)\n            }\n            completion()\n        }\n    }\n    \n    func fetchUsers(_ completion: @escaping (() -> ())) {\n        let request = UsersLookUpRequest(screenNames: screenNames)\n        client.sendTwitterRequest(request) { [weak self] in\n            switch $0.result {\n            case .success(let users):\n                self?.users = users\n            case .failure(let error):\n                print(error)\n            }\n            completion()\n        }\n    }\n}\n"
  },
  {
    "path": "HoverConversionSample/HoverConversionSample/Request/StatusesUserTimelineRequest.swift",
    "content": "//\n//  StatusesUserTimelineRequest.swift\n//  HoverConversionSample\n//\n//  Created by 鈴木大貴 on 2016/09/08.\n//  Copyright © 2016年 szk-atmosphere. All rights reserved.\n//\n\nimport Foundation\nimport TwitterKit\n\nstruct StatusesUserTimelineRequest: TWTRGetRequestable {\n    typealias ResponseType = [TWTRTweet]\n    typealias ParseResultType = [[String : NSObject]]\n    \n    let path: String = \"/1.1/statuses/user_timeline.json\"\n    \n    let screenName: String\n    let maxId: String?\n    let count: Int?\n    \n    var parameters: [AnyHashable: Any]? {\n        var parameters: [AnyHashable: Any] = [\n            \"screen_name\" : screenName\n        ]\n        if let maxId = maxId {\n            parameters[\"max_id\"] = maxId\n        }\n        if let count = count {\n            parameters[\"count\"] = String(count)\n        }\n        return parameters\n    }\n    \n    static func decode(_ data: Data) -> TWTRResult<ResponseType> {\n        switch UsersLookUpRequest.parseData(data) {\n        case .success(let parsedData):\n            return .success(parsedData.flatMap { TWTRTweet(jsonDictionary: $0) })\n        case .failure(let error):\n            return .failure(error)\n        }\n    }\n}\n"
  },
  {
    "path": "HoverConversionSample/HoverConversionSample/Request/TWTRAPIClient+Extra.swift",
    "content": "//\n//  TWTRAPIClient+Extra.swift\n//  HoverConversionSample\n//\n//  Created by Taiki Suzuki on 2016/09/04.\n//  Copyright © 2016年 marty-suzuki. All rights reserved.\n//\n\nimport Foundation\nimport TwitterKit\n\nenum TWTRResult<T> {\n    case success(T)\n    case failure(NSError)\n}\n\nstruct TWTRResponse<T> {\n    let request: URLRequest?\n    let response: HTTPURLResponse?\n    let data: Data?\n    let result: TWTRResult<T>\n}\n\nenum TWTRHTTPMethod: String {\n    case GET = \"GET\"\n}\n\nextension TWTRAPIClient {\n    func sendTwitterRequest<T: TWTRRequestable>(_ request: T, completion: @escaping (TWTRResponse<T.ResponseType>) -> ()) {\n        guard let URL = request.URL else {\n            let error = NSError(domain: TWTRAPIErrorDomain, code: -9999, userInfo: nil)\n            completion(TWTRResponse(request: nil, response: nil, data: nil, result: .failure(error)))\n            return\n        }\n        let absoluteString = URL.absoluteString\n        var error: NSError?\n        let request = urlRequest(withMethod: request.method.rawValue, url: absoluteString, parameters: request.parameters, error: &error)\n        if let error = error {\n            completion(TWTRResponse(request: request, response: nil, data: nil, result: .failure(error)))\n            return\n        }\n        sendTwitterRequest(request) {\n            let result: TWTRResult<T.ResponseType>\n            if let error = $0.2 {\n                result = .failure(error as NSError)\n            } else if let data = $0.1 {\n                switch T.decode(data) {\n                case .success(let decodeData):\n                    result = .success(decodeData)\n                case .failure(let error):\n                    result = .failure(error)\n                }\n            } else {\n                result = .failure(NSError(domain: TWTRAPIErrorDomain, code: -9999, userInfo: nil))\n            }\n            completion(TWTRResponse(request: request, response: $0.0 as? HTTPURLResponse, data: $0.1, result: result))\n        }\n    }\n}\n"
  },
  {
    "path": "HoverConversionSample/HoverConversionSample/Request/TWTRRequestable.swift",
    "content": "//\n//  TWTRRequestable.swift\n//  HoverConversionSample\n//\n//  Created by 鈴木大貴 on 2016/09/08.\n//  Copyright © 2016年 szk-atmosphere. All rights reserved.\n//\n\nimport Foundation\nimport TwitterKit\n\nprotocol TWTRRequestable {\n    associatedtype ResponseType\n    associatedtype ParseResultType\n    var method: TWTRHTTPMethod { get }\n    var baseURL: Foundation.URL? { get }\n    var path: String { get }\n    var URL: Foundation.URL? { get }\n    var parameters: [AnyHashable: Any]? { get }\n    static func parseData(_ data: Data) -> TWTRResult<ParseResultType>\n    static func decode(_ data: Data) -> TWTRResult<ResponseType>\n}\n\nextension TWTRRequestable {\n    var baseURL: Foundation.URL? {\n        return Foundation.URL(string: \"https://api.twitter.com\")\n    }\n    \n    var URL: Foundation.URL? {\n        return Foundation.URL(string: path, relativeTo: baseURL)\n    }\n    \n    static func parseData(_ data: Data) -> TWTRResult<ParseResultType> {\n        do {\n            let anyObject = try JSONSerialization.jsonObject(with: data, options: .allowFragments)\n            guard let object = anyObject as? ParseResultType else {\n                return .failure(NSError(domain: TWTRAPIErrorDomain, code: -9999, userInfo: nil))\n            }\n            return .success(object)\n        } catch let error as NSError {\n            return .failure(error)\n        }\n    }\n}\n\nprotocol TWTRGetRequestable: TWTRRequestable {}\nextension TWTRGetRequestable {\n    var method: TWTRHTTPMethod {\n        return .GET\n    }\n}\n"
  },
  {
    "path": "HoverConversionSample/HoverConversionSample/Request/UsersLookUpRequest.swift",
    "content": "//\n//  UsersLookUpRequest.swift\n//  HoverConversionSample\n//\n//  Created by 鈴木大貴 on 2016/09/08.\n//  Copyright © 2016年 szk-atmosphere. All rights reserved.\n//\n\nimport Foundation\nimport TwitterKit\n\nstruct UsersLookUpRequest: TWTRGetRequestable {\n    typealias ResponseType = [TWTRUser]\n    typealias ParseResultType = [[String : NSObject]]\n    \n    let path: String = \"/1.1/users/lookup.json\"\n    \n    let screenNames: [String]\n    \n    var parameters: [AnyHashable: Any]? {\n        let screenNameValue: String = screenNames.joined(separator: \",\")\n        let parameters: [AnyHashable: Any] = [\n            \"screen_name\" : screenNameValue,\n            \"include_entities\" : \"true\"\n        ]\n        return parameters\n    }\n    \n    static func decode(_ data: Data) -> TWTRResult<ResponseType> {\n        switch UsersLookUpRequest.parseData(data) {\n        case .success(let parsedData):\n            return .success(parsedData.flatMap { TWTRUser(jsonDictionary: $0) })\n        case .failure(let error):\n            return .failure(error)\n        }\n    }\n}\n"
  },
  {
    "path": "HoverConversionSample/HoverConversionSample/View/NextHeaderView.swift",
    "content": "//\n//  NextHeaderView.swift\n//  HoverConversionSample\n//\n//  Created by 鈴木大貴 on 2016/09/13.\n//  Copyright © 2016年 szk-atmosphere. All rights reserved.\n//\n\nimport UIKit\nimport HoverConversion\nimport TwitterKit\nimport MisterFusion\n\nprotocol IconImageViewLoadable {\n    var iconImageView: UIImageView! { get }\n    func loadImage(_ url: URL)\n}\n\nextension IconImageViewLoadable {\n    func loadImage(_ url: URL) {\n        DispatchQueue.global().async {\n            guard let data = try? Data(contentsOf: url) else { return }\n            DispatchQueue.main.async {\n                guard let image = UIImage(data: data) else { return }\n                self.iconImageView.image = image\n            }\n        }\n    }\n}\n\nclass NextHeaderView: HCNextHeaderView, IconImageViewLoadable {\n    var user: TWTRUser? {\n        didSet {\n            guard let user = user else { return }\n            setupViews()\n            \n            titleLabel.numberOfLines = 2\n            let attributedText = NSMutableAttributedString()\n            attributedText.append(NSAttributedString(string: user.name + \"\\n\", attributes: [\n                NSFontAttributeName : UIFont.boldSystemFont(ofSize: 18),\n                NSForegroundColorAttributeName : UIColor.white\n                ]))\n            attributedText.append(NSAttributedString(string: \"@\" + user.screenName, attributes: [\n                NSFontAttributeName : UIFont.systemFont(ofSize: 16),\n                NSForegroundColorAttributeName : UIColor(white: 1, alpha: 0.6)\n                ]))\n            titleLabel.attributedText = attributedText\n            \n            guard let url = URL(string: user.profileImageLargeURL) else { return }\n            loadImage(url)\n        }\n    }\n    \n    let iconImageView: UIImageView! = UIImageView(frame: .zero)\n    let titleLabel: UILabel = UILabel(frame: .zero)\n    \n    init() {\n        super.init(frame: .zero)\n    }\n    \n    required init?(coder aDecoder: NSCoder) {\n        fatalError(\"init(coder:) has not been implemented\")\n    }\n    \n    override func layoutSubviews() {\n        super.layoutSubviews()\n        iconImageView.layer.cornerRadius = iconImageView.bounds.size.height / 2\n    }\n    \n    fileprivate func setupViews() {\n        addLayoutSubview(iconImageView, andConstraints:\n            iconImageView.top |+| 8,\n            iconImageView.left |+| 8,\n            iconImageView.bottom |-| 8,\n            iconImageView.width |==| iconImageView.height\n        )\n        \n        iconImageView.layer.borderWidth = 1\n        iconImageView.layer.borderColor = UIColor.lightGray.cgColor\n        iconImageView.layer.masksToBounds = true\n        \n        addLayoutSubview(titleLabel, andConstraints:\n            titleLabel.top |+| 4,\n            titleLabel.right |-| 4,\n            titleLabel.left |==| iconImageView.right |+| 16,\n            titleLabel.bottom |-| 4\n        )\n        \n        backgroundColor = UIColor(red: 0.25, green: 0.25, blue: 0.25, alpha: 1)\n    }\n}\n"
  },
  {
    "path": "HoverConversionSample/HoverConversionSample/ViewController/HomeViewController.swift",
    "content": "//\n//  HomeViewController.swift\n//  HoverConversionSample\n//\n//  Created by Taiki Suzuki on 2016/07/18.\n//  Copyright © 2016年 marty-suzuki. All rights reserved.\n//\n\nimport UIKit\nimport HoverConversion\nimport TwitterKit\n\nclass HomeViewController: HCRootViewController {\n\n    let twitterManager = TwitterManager()\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        // Do any additional setup after loading the view, typically from a nib.\n        navigationView.backgroundColor = UIColor(red: 85 / 255, green: 172 / 255, blue: 238 / 255, alpha: 1)\n        navigationView.titleLabel.textColor = .white\n        tableView.delegate = self\n        tableView.dataSource = self\n        tableView.register(UITableViewCell.self, forCellReuseIdentifier: \"UITableViewCell\")\n        tableView.register(UINib(nibName: \"HomeTableViewCell\", bundle: nil), forCellReuseIdentifier: \"HomeTableViewCell\")\n        title = \"Following List\"\n    }\n\n    override var preferredStatusBarStyle: UIStatusBarStyle {\n        return .lightContent\n    }\n    \n    override func viewDidAppear(_ animated: Bool) {\n        super.viewDidAppear(animated)\n        \n        let group = DispatchGroup()\n        group.enter()\n        twitterManager.fetchUsersTimeline {\n            group.leave()\n        }\n        group.enter()\n        twitterManager.fetchUsers {\n            group.leave()\n        }\n        group.notify(queue: DispatchQueue.main) {\n            self.twitterManager.sortUsers()\n            self.tableView.reloadData()\n        }\n    }\n    override func didReceiveMemoryWarning() {\n        super.didReceiveMemoryWarning()\n        // Dispose of any resources that can be recreated.\n    }\n    \n    fileprivate func showPagingViewContoller(indexPath: IndexPath) {\n        let vc = HCPagingViewController(indexPath: indexPath)\n        vc.dataSource = self\n        navigationController?.pushViewController(vc, animated: true)\n    }\n}\n\nextension HomeViewController: UITableViewDataSource {\n    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {\n        if twitterManager.tweets.count == twitterManager.users.count {\n            return twitterManager.users.count\n        }\n        return 0\n    }\n    \n    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {\n        let user = twitterManager.users[(indexPath as NSIndexPath).row]\n        guard let tweet = twitterManager.tweets[user.screenName]?.first else {\n            return tableView.dequeueReusableCell(withIdentifier: \"UITableViewCell\")!\n        }\n        let cell = tableView.dequeueReusableCell(withIdentifier: \"HomeTableViewCell\") as! HomeTableViewCell\n        cell.userValue = (user, tweet)\n        return cell\n    }\n}\n\nextension HomeViewController: UITableViewDelegate {\n    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {\n        return HomeTableViewCell.Height\n    }\n    \n    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {\n        tableView.deselectRow(at: indexPath, animated: false)\n        showPagingViewContoller(indexPath: indexPath)\n    }\n}\n\nextension HomeViewController: HCPagingViewControllerDataSource {\n    func pagingViewController(_ viewController: HCPagingViewController, viewControllerFor indexPath: IndexPath) -> HCContentViewController? {\n        guard 0 <= indexPath.row && indexPath.row < twitterManager.users.count else { return nil }\n        let vc = UserTimelineViewController()\n        vc.user = twitterManager.users[indexPath.row]\n        return vc\n    }\n    \n    func pagingViewController(_ viewController: HCPagingViewController, nextHeaderViewFor indexPath: IndexPath) -> HCNextHeaderView? {\n        guard 0 <= indexPath.row && indexPath.row < twitterManager.users.count else { return nil }\n        let view = NextHeaderView()\n        view.user = twitterManager.users[indexPath.row]\n        return view\n    }\n}\n"
  },
  {
    "path": "HoverConversionSample/HoverConversionSample/ViewController/UserTimelineViewController.swift",
    "content": "//\n//  UserTimelineViewController.swift\n//  HoverConversionSample\n//\n//  Created by Taiki Suzuki on 2016/09/05.\n//  Copyright © 2016年 marty-suzuki. All rights reserved.\n//\n\nimport UIKit\nimport HoverConversion\nimport TwitterKit\n\nclass UserTimelineViewController: HCContentViewController {\n    var user: TWTRUser?\n    \n    fileprivate var tweets: [TWTRTweet] = []\n    fileprivate var hasNext = true\n    fileprivate let client = TWTRAPIClient()\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        // Do any additional setup after loading the view.\n        navigationView.backgroundColor = UIColor(red: 85 / 255, green: 172 / 255, blue: 238 / 255, alpha: 1)\n        \n        if let user = user {\n            navigationView.titleLabel.numberOfLines = 2\n            let attributedText = NSMutableAttributedString()\n            attributedText.append(NSAttributedString(string: user.name + \"\\n\", attributes: [\n                NSFontAttributeName : UIFont.boldSystemFont(ofSize: 14),\n                NSForegroundColorAttributeName : UIColor.white\n            ]))\n            attributedText.append(NSAttributedString(string: \"@\" + user.screenName, attributes: [\n                NSFontAttributeName : UIFont.systemFont(ofSize: 12),\n                NSForegroundColorAttributeName : UIColor(white: 1, alpha: 0.6)\n            ]))\n            navigationView.titleLabel.attributedText = attributedText\n        }\n        \n        tableView.register(UITableViewCell.self, forCellReuseIdentifier: \"UITableViewCell\")\n        tableView.register(TWTRTweetTableViewCell.self, forCellReuseIdentifier: \"TWTRTweetTableViewCell\")\n        tableView.dataSource = self\n        loadTweets()\n    }\n    \n    override var preferredStatusBarStyle: UIStatusBarStyle {\n        return .lightContent\n    }\n    \n    override func didReceiveMemoryWarning() {\n        super.didReceiveMemoryWarning()\n        // Dispose of any resources that can be recreated.\n    }\n    \n    fileprivate func loadTweets() {\n        guard let user = user , hasNext else { return }\n        let oldestTweetId = tweets.first?.tweetID\n        let request = StatusesUserTimelineRequest(screenName: user.screenName, maxId: oldestTweetId, count: nil)\n        client.sendTwitterRequest(request) { [weak self] in\n            switch $0.result {\n            case .success(let tweets):\n                if tweets.count < 1 {\n                    self?.hasNext = false\n                    return\n                }\n                let filterdTweets = tweets.filter { $0.tweetID != oldestTweetId }\n                let sortedTweets = filterdTweets.sorted { $0.0.createdAt.timeIntervalSince1970 < $0.1.createdAt.timeIntervalSince1970 }\n                guard let storedTweets = self?.tweets else { return }\n                self?.tweets = sortedTweets + storedTweets\n                self?.tableView.reloadData()\n                if let tweets = self?.tweets {\n                    let indexPath = IndexPath(row: tweets.count - 2, section: 0)\n                    self?.tableView.scrollToRow(at: indexPath, at: .bottom, animated: false)\n                }\n            case .failure(let error):\n                print(error)\n                self?.hasNext = false\n            }\n        }\n    }\n}\n\nextension UserTimelineViewController {\n    func tableView(_ tableView: UITableView, heightForRowAtIndexPath indexPath: IndexPath) -> CGFloat {\n        guard (indexPath as NSIndexPath).row < tweets.count else { return 0 }\n        let tweet = tweets[(indexPath as NSIndexPath).row]\n        let width = UIScreen.main.bounds.size.width\n        return TWTRTweetTableViewCell.height(for: tweet, style: .compact, width: width, showingActions: false)\n    }\n    \n    func tableView(_ tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: IndexPath) {\n        if (indexPath as NSIndexPath).row < 1 {\n            //loadTweets()\n        }\n    }\n}\n\nextension UserTimelineViewController: UITableViewDataSource {\n    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {\n        return tweets.count\n    }\n    \n    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {\n        guard let cell = tableView.dequeueReusableCell(withIdentifier: \"TWTRTweetTableViewCell\") as? TWTRTweetTableViewCell else {\n            return tableView.dequeueReusableCell(withIdentifier: \"UITableViewCell\")!\n        }\n        cell.configure(with: tweets[(indexPath as NSIndexPath).row])\n        return cell\n    }\n}\n"
  },
  {
    "path": "HoverConversionSample/HoverConversionSample.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t376AB1C31D8705C8001A8CD7 /* NextHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 376AB1C21D8705C8001A8CD7 /* NextHeaderView.swift */; };\n\t\t376B9FC61D7C72B90009CC07 /* UserTimelineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 376B9FC51D7C72B90009CC07 /* UserTimelineViewController.swift */; };\n\t\t376B9FC91D80752B0009CC07 /* TWTRAPIClient+Extra.swift in Sources */ = {isa = PBXBuildFile; fileRef = 376B9FC81D80752B0009CC07 /* TWTRAPIClient+Extra.swift */; };\n\t\t376B9FCB1D80755A0009CC07 /* UsersLookUpRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 376B9FCA1D80755A0009CC07 /* UsersLookUpRequest.swift */; };\n\t\t376B9FCD1D8076A10009CC07 /* TWTRRequestable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 376B9FCC1D8076A10009CC07 /* TWTRRequestable.swift */; };\n\t\t376B9FCF1D808B250009CC07 /* StatusesUserTimelineRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 376B9FCE1D808B250009CC07 /* StatusesUserTimelineRequest.swift */; };\n\t\t377008E71D3BDAC7007606E8 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 377008E61D3BDAC7007606E8 /* AppDelegate.swift */; };\n\t\t377008EC1D3BDAC7007606E8 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 377008EA1D3BDAC7007606E8 /* Main.storyboard */; };\n\t\t377008EE1D3BDAC7007606E8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 377008ED1D3BDAC7007606E8 /* Assets.xcassets */; };\n\t\t377008F11D3BDAC7007606E8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 377008EF1D3BDAC7007606E8 /* LaunchScreen.storyboard */; };\n\t\t3799D0D81D7B462400CD339B /* TwitterManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3799D0D31D7B462400CD339B /* TwitterManager.swift */; };\n\t\t3799D0DA1D7B462400CD339B /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3799D0D71D7B462400CD339B /* HomeViewController.swift */; };\n\t\t3799D0DD1D7B468600CD339B /* HomeTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3799D0DB1D7B468600CD339B /* HomeTableViewCell.swift */; };\n\t\t3799D0DE1D7B468600CD339B /* HomeTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3799D0DC1D7B468600CD339B /* HomeTableViewCell.xib */; };\n\t\tA19CAA499B1B6C5C98BAF960 /* Pods_HoverConversionSample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 989C93E9FFF664FC7F5DAC59 /* Pods_HoverConversionSample.framework */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\t178E9201DDD007E86236711A /* Pods-HoverConversionSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-HoverConversionSample.debug.xcconfig\"; path = \"Pods/Target Support Files/Pods-HoverConversionSample/Pods-HoverConversionSample.debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t376AB1C21D8705C8001A8CD7 /* NextHeaderView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NextHeaderView.swift; sourceTree = \"<group>\"; };\n\t\t376B9FC51D7C72B90009CC07 /* UserTimelineViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserTimelineViewController.swift; sourceTree = \"<group>\"; };\n\t\t376B9FC81D80752B0009CC07 /* TWTRAPIClient+Extra.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = \"TWTRAPIClient+Extra.swift\"; sourceTree = \"<group>\"; };\n\t\t376B9FCA1D80755A0009CC07 /* UsersLookUpRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UsersLookUpRequest.swift; sourceTree = \"<group>\"; };\n\t\t376B9FCC1D8076A10009CC07 /* TWTRRequestable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TWTRRequestable.swift; sourceTree = \"<group>\"; };\n\t\t376B9FCE1D808B250009CC07 /* StatusesUserTimelineRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StatusesUserTimelineRequest.swift; sourceTree = \"<group>\"; };\n\t\t377008E31D3BDAC6007606E8 /* HoverConversionSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HoverConversionSample.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t377008E61D3BDAC7007606E8 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = \"<group>\"; };\n\t\t377008EB1D3BDAC7007606E8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = \"<group>\"; };\n\t\t377008ED1D3BDAC7007606E8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = \"<group>\"; };\n\t\t377008F01D3BDAC7007606E8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = \"<group>\"; };\n\t\t377008F21D3BDAC7007606E8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t3799D0D31D7B462400CD339B /* TwitterManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TwitterManager.swift; sourceTree = \"<group>\"; };\n\t\t3799D0D71D7B462400CD339B /* HomeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = \"<group>\"; };\n\t\t3799D0DB1D7B468600CD339B /* HomeTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeTableViewCell.swift; sourceTree = \"<group>\"; };\n\t\t3799D0DC1D7B468600CD339B /* HomeTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HomeTableViewCell.xib; sourceTree = \"<group>\"; };\n\t\t989C93E9FFF664FC7F5DAC59 /* Pods_HoverConversionSample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_HoverConversionSample.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\tBCBB46B066D4D58B7568C17F /* Pods-HoverConversionSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-HoverConversionSample.release.xcconfig\"; path = \"Pods/Target Support Files/Pods-HoverConversionSample/Pods-HoverConversionSample.release.xcconfig\"; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t377008E01D3BDAC6007606E8 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tA19CAA499B1B6C5C98BAF960 /* Pods_HoverConversionSample.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t376B9FC71D80752B0009CC07 /* Request */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t376B9FC81D80752B0009CC07 /* TWTRAPIClient+Extra.swift */,\n\t\t\t\t376B9FCC1D8076A10009CC07 /* TWTRRequestable.swift */,\n\t\t\t\t376B9FCA1D80755A0009CC07 /* UsersLookUpRequest.swift */,\n\t\t\t\t376B9FCE1D808B250009CC07 /* StatusesUserTimelineRequest.swift */,\n\t\t\t);\n\t\t\tpath = Request;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t377008DA1D3BDAC6007606E8 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t377008E51D3BDAC7007606E8 /* HoverConversionSample */,\n\t\t\t\t377008E41D3BDAC6007606E8 /* Products */,\n\t\t\t\t77C3C9ACBF70123F6F82AA62 /* Pods */,\n\t\t\t\t3BDC8B7EA0C8D8C60EA01922 /* Frameworks */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t377008E41D3BDAC6007606E8 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t377008E31D3BDAC6007606E8 /* HoverConversionSample.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t377008E51D3BDAC7007606E8 /* HoverConversionSample */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t377008E61D3BDAC7007606E8 /* AppDelegate.swift */,\n\t\t\t\t377008EA1D3BDAC7007606E8 /* Main.storyboard */,\n\t\t\t\t3799D0D11D7B462400CD339B /* Cell */,\n\t\t\t\t3799D0D21D7B462400CD339B /* Manager */,\n\t\t\t\t376B9FC71D80752B0009CC07 /* Request */,\n\t\t\t\t3799D0D51D7B462400CD339B /* View */,\n\t\t\t\t3799D0D61D7B462400CD339B /* ViewController */,\n\t\t\t\t377008ED1D3BDAC7007606E8 /* Assets.xcassets */,\n\t\t\t\t377008EF1D3BDAC7007606E8 /* LaunchScreen.storyboard */,\n\t\t\t\t377008F21D3BDAC7007606E8 /* Info.plist */,\n\t\t\t);\n\t\t\tpath = HoverConversionSample;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t3799D0D11D7B462400CD339B /* Cell */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t3799D0DB1D7B468600CD339B /* HomeTableViewCell.swift */,\n\t\t\t\t3799D0DC1D7B468600CD339B /* HomeTableViewCell.xib */,\n\t\t\t);\n\t\t\tpath = Cell;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t3799D0D21D7B462400CD339B /* Manager */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t3799D0D31D7B462400CD339B /* TwitterManager.swift */,\n\t\t\t);\n\t\t\tpath = Manager;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t3799D0D51D7B462400CD339B /* View */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t376AB1C21D8705C8001A8CD7 /* NextHeaderView.swift */,\n\t\t\t);\n\t\t\tpath = View;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t3799D0D61D7B462400CD339B /* ViewController */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t3799D0D71D7B462400CD339B /* HomeViewController.swift */,\n\t\t\t\t376B9FC51D7C72B90009CC07 /* UserTimelineViewController.swift */,\n\t\t\t);\n\t\t\tpath = ViewController;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t3BDC8B7EA0C8D8C60EA01922 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t989C93E9FFF664FC7F5DAC59 /* Pods_HoverConversionSample.framework */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t77C3C9ACBF70123F6F82AA62 /* Pods */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t178E9201DDD007E86236711A /* Pods-HoverConversionSample.debug.xcconfig */,\n\t\t\t\tBCBB46B066D4D58B7568C17F /* Pods-HoverConversionSample.release.xcconfig */,\n\t\t\t);\n\t\t\tname = Pods;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t377008E21D3BDAC6007606E8 /* HoverConversionSample */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 377008F51D3BDAC7007606E8 /* Build configuration list for PBXNativeTarget \"HoverConversionSample\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t60CE7C4347D44804863A8C57 /* [CP] Check Pods Manifest.lock */,\n\t\t\t\t377008DF1D3BDAC6007606E8 /* Sources */,\n\t\t\t\t377008E01D3BDAC6007606E8 /* Frameworks */,\n\t\t\t\t377008E11D3BDAC6007606E8 /* Resources */,\n\t\t\t\t3799D0CC1D7AB6B300CD339B /* ShellScript */,\n\t\t\t\tE091ECB7B854A4215F480250 /* [CP] Embed Pods Frameworks */,\n\t\t\t\t90CB03264FD0C6DD77F59633 /* [CP] Copy Pods Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = HoverConversionSample;\n\t\t\tproductName = HoverConversionSample;\n\t\t\tproductReference = 377008E31D3BDAC6007606E8 /* HoverConversionSample.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t377008DB1D3BDAC6007606E8 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastSwiftUpdateCheck = 0730;\n\t\t\t\tLastUpgradeCheck = 0800;\n\t\t\t\tORGANIZATIONNAME = \"szk-atmosphere\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t377008E21D3BDAC6007606E8 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 7.3.1;\n\t\t\t\t\t\tLastSwiftMigration = 0800;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 377008DE1D3BDAC6007606E8 /* Build configuration list for PBXProject \"HoverConversionSample\" */;\n\t\t\tcompatibilityVersion = \"Xcode 3.2\";\n\t\t\tdevelopmentRegion = English;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 377008DA1D3BDAC6007606E8;\n\t\t\tproductRefGroup = 377008E41D3BDAC6007606E8 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t377008E21D3BDAC6007606E8 /* HoverConversionSample */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t377008E11D3BDAC6007606E8 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t377008F11D3BDAC7007606E8 /* LaunchScreen.storyboard in Resources */,\n\t\t\t\t377008EE1D3BDAC7007606E8 /* Assets.xcassets in Resources */,\n\t\t\t\t3799D0DE1D7B468600CD339B /* HomeTableViewCell.xib in Resources */,\n\t\t\t\t377008EC1D3BDAC7007606E8 /* Main.storyboard in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXShellScriptBuildPhase section */\n\t\t3799D0CC1D7AB6B300CD339B /* ShellScript */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"${PODS_ROOT}/Fabric/run\\\" 17f9b693790022f676a0812ed5b69bf3f93d01ff e63261495fad4e59db4746e04a9bedd867c4ef814a71a5d3fd4d6e5478288a20\";\n\t\t};\n\t\t60CE7C4347D44804863A8C57 /* [CP] Check Pods Manifest.lock */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\tname = \"[CP] Check Pods Manifest.lock\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"diff \\\"${PODS_ROOT}/../Podfile.lock\\\" \\\"${PODS_ROOT}/Manifest.lock\\\" > /dev/null\\nif [ $? != 0 ] ; then\\n    # print error to STDERR\\n    echo \\\"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\\\" >&2\\n    exit 1\\nfi\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\t90CB03264FD0C6DD77F59633 /* [CP] Copy Pods Resources */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\tname = \"[CP] Copy Pods Resources\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"${SRCROOT}/Pods/Target Support Files/Pods-HoverConversionSample/Pods-HoverConversionSample-resources.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\tE091ECB7B854A4215F480250 /* [CP] Embed Pods Frameworks */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\tname = \"[CP] Embed Pods Frameworks\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"${SRCROOT}/Pods/Target Support Files/Pods-HoverConversionSample/Pods-HoverConversionSample-frameworks.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t377008DF1D3BDAC6007606E8 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t376B9FCF1D808B250009CC07 /* StatusesUserTimelineRequest.swift in Sources */,\n\t\t\t\t376B9FC61D7C72B90009CC07 /* UserTimelineViewController.swift in Sources */,\n\t\t\t\t376AB1C31D8705C8001A8CD7 /* NextHeaderView.swift in Sources */,\n\t\t\t\t376B9FC91D80752B0009CC07 /* TWTRAPIClient+Extra.swift in Sources */,\n\t\t\t\t3799D0DD1D7B468600CD339B /* HomeTableViewCell.swift in Sources */,\n\t\t\t\t3799D0DA1D7B462400CD339B /* HomeViewController.swift in Sources */,\n\t\t\t\t376B9FCB1D80755A0009CC07 /* UsersLookUpRequest.swift in Sources */,\n\t\t\t\t377008E71D3BDAC7007606E8 /* AppDelegate.swift in Sources */,\n\t\t\t\t376B9FCD1D8076A10009CC07 /* TWTRRequestable.swift in Sources */,\n\t\t\t\t3799D0D81D7B462400CD339B /* TwitterManager.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXVariantGroup section */\n\t\t377008EA1D3BDAC7007606E8 /* Main.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t377008EB1D3BDAC7007606E8 /* Base */,\n\t\t\t);\n\t\t\tname = Main.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t377008EF1D3BDAC7007606E8 /* LaunchScreen.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t377008F01D3BDAC7007606E8 /* Base */,\n\t\t\t);\n\t\t\tname = LaunchScreen.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t377008F31D3BDAC7007606E8 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.3;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t377008F41D3BDAC7007606E8 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.3;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Owholemodule\";\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t377008F61D3BDAC7007606E8 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 178E9201DDD007E86236711A /* Pods-HoverConversionSample.debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = \"$(inherited)\";\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tINFOPLIST_FILE = HoverConversionSample/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.3;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"szk-atmosphere.HoverConversionSample\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t377008F71D3BDAC7007606E8 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = BCBB46B066D4D58B7568C17F /* Pods-HoverConversionSample.release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = \"$(inherited)\";\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tINFOPLIST_FILE = HoverConversionSample/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.3;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"szk-atmosphere.HoverConversionSample\";\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t377008DE1D3BDAC6007606E8 /* Build configuration list for PBXProject \"HoverConversionSample\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t377008F31D3BDAC7007606E8 /* Debug */,\n\t\t\t\t377008F41D3BDAC7007606E8 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t377008F51D3BDAC7007606E8 /* Build configuration list for PBXNativeTarget \"HoverConversionSample\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t377008F61D3BDAC7007606E8 /* Debug */,\n\t\t\t\t377008F71D3BDAC7007606E8 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 377008DB1D3BDAC6007606E8 /* Project object */;\n}\n"
  },
  {
    "path": "HoverConversionSample/HoverConversionSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:HoverConversionSample.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "HoverConversionSample/HoverConversionSample.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"group:HoverConversionSample.xcodeproj\">\n   </FileRef>\n   <FileRef\n      location = \"group:Pods/Pods.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "HoverConversionSample/Podfile",
    "content": "# Uncomment this line to define a global platform for your project\nplatform :ios, '8.0'\n# Uncomment this line if you're using Swift\nuse_frameworks!\n\ntarget 'HoverConversionSample' do\npod 'HoverConversion', :path => '../'\npod 'Fabric'\npod 'TwitterKit'\npod 'TwitterCore'\npod 'TouchVisualizer', '~>2.0.1'\nend\n\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright (c) 2016 szk-atmosphere <s1180183@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# HoverConversion\n\n[![Platform](http://img.shields.io/badge/platform-ios-blue.svg?style=flat\n)](https://developer.apple.com/iphone/index.action)\n[![Language](http://img.shields.io/badge/language-swift-brightgreen.svg?style=flat\n)](https://developer.apple.com/swift)\n[![Version](https://img.shields.io/cocoapods/v/HoverConversion.svg?style=flat)](http://cocoapods.org/pods/HoverConversion)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![License](https://img.shields.io/cocoapods/l/HoverConversion.svg?style=flat)](http://cocoapods.org/pods/HoverConversion)\n\n[ManiacDev.com](https://maniacdev.com/) referred.  \n[https://maniacdev.com/2016/09/hoverconversion-a-swift-ui-component-for-navigating-between-multiple-table-views](https://maniacdev.com/2016/09/hoverconversion-a-swift-ui-component-for-navigating-between-multiple-table-views)\n\n![](./Images/sample1.gif) ![](./Images/sample2.gif)\n\nHoverConversion realized vertical paging with UITableView. UIViewController will be paging when reaching top or bottom of UITableView's contentOffset.\n\n## Featrue\n\n- [x] Vertical paging with UITableView\n- [x] Seamless transitioning\n- [x] Transitioning with navigationView pan gesture\n- [x] Selected cell that related to UIViewController is highlighting\n- [x] Support Swift2.3\n- [x] Support Swift3\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Installation\n\nHoverConversion is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod \"HoverConversion\"\n```\n\n## Usage\n\nIf you install from cocoapods, You have to write `import HoverConversion`.\n\n#### Storyboard or Xib\n\n![](./Images/storyboard.png)\n\nSet custom class of `UINavigationController` to `HCNavigationController`. In addition, set module to `HoverConversion`.\nAnd set `HCRootViewController` as `navigationController`'s first viewController.\n\n#### Code\n\nSet `HCNavigationController` as `self.window.rootViewController`.\nAnd set `HCRootViewController` as `navigationController`'s first viewController.\n\n#### HCPagingViewController\n\nIf you want to show vertical contents, please use `HCPagingViewController`.\n\n```swift\nlet vc = HCPagingViewController(indexPath: indexPath)\nvc.dataSource = self\nnavigationController?.pushViewController(vc, animated: true)\n```\n\n#### HCContentViewController\n\nA content included in `HCPagingViewController` is `HCContentViewController`.  \nReturn `HCContentViewController` (or subclass)  with this delegate method.\n\n```swift\nextension ViewController: HCPagingViewControllerDataSource {\n    func pagingViewController(viewController: HCPagingViewController, viewControllerFor indexPath: NSIndexPath) -> HCContentViewController? {\n        guard 0 <= indexPath.row && indexPath.row < twitterManager.users.count else { return nil }\n        let vc = UserTimelineViewController()\n        vc.user = twitterManager.users[indexPath.row]\n        return vc\n    }\n}\n```\n\n#### HCNextHeaderView\n\n![](./Images/next_header.png)\n\nReturn `HCNextHeaderView` (or subclass)  with this delegate method.\n\n```swift\nextension ViewController: HCPagingViewControllerDataSource {\n    func pagingViewController(viewController: HCPagingViewController, nextHeaderViewFor indexPath: NSIndexPath) -> HCNextHeaderView? {\n        guard 0 <= indexPath.row && indexPath.row < twitterManager.users.count else { return nil }\n        let view = NextHeaderView()\n        view.user = twitterManager.users[indexPath.row]\n        return view\n    }\n}\n```\n\n#### Stop transitioning\n\nIf you want to load more contents from server and want to stop transitioning, you can use `canPaging` in `HCContentViewController`.\n\n```swift\n//Stop transitioning to previous ViewController\ncanPaging[.prev] = false //Default true\n\n//Stop transitioning to next ViewController\ncanPaging[.next] = false //Default true\n```\n\n## Requirements\n\n- Xcode 7.3 or greater\n- iOS 8.0 or greater\n- [MisterFusion](https://github.com/marty-suzuki/MisterFusion) - Swift DSL for AutoLayout\n\n## Special Thanks\n\nThose OSS are used in sample project!\n\n- [TouchVisualizer](https://github.com/morizotter/TouchVisualizer) (Created by [@morizotter](https://github.com/morizotter))\n- [TwitterKit](https://docs.fabric.io/apple/twitter/overview.html#)\n\n## Author\n\nmarty-suzuki, s1180183@gmail.com\n\n## License\n\nHoverConversion is available under the MIT license. See the LICENSE file for more info.\n"
  }
]