Skip to content

Commit

Permalink
Merge pull request #33 from Yalantis/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
rnkyr authored Jan 29, 2018
2 parents 1896a2f + b77fbe3 commit a3b33bd
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 22 deletions.
4 changes: 2 additions & 2 deletions DisplaySwitcher.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.cocoapods.Pod;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -336,7 +336,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.cocoapods.Pod;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13527"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<customFonts key="customFonts">
<mutableArray key="Dosis-ExtraLight.otf">
<array key="Dosis-ExtraLight.otf">
<string>Dosis-ExtraLight</string>
</mutableArray>
<mutableArray key="Dosis-Regular.otf">
</array>
<array key="Dosis-Regular.otf">
<string>Dosis-Regular</string>
<string>Dosis-Regular</string>
</mutableArray>
</array>
</customFonts>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="UserCollectionViewCell" id="gdF-wQ-JiZ" customClass="UserCollectionViewCell" customModule="YALLayoutTransitioning" customModuleProvider="target">
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="UserCollectionViewCell" id="gdF-wQ-JiZ" customClass="UserCollectionViewCell" customModule="DisplaySwitcher_Example" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="320" height="80"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
Expand All @@ -24,35 +28,35 @@
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xuV-JL-rj1">
<rect key="frame" x="0.0" y="0.0" width="320" height="80"/>
<color key="backgroundColor" red="0.1215686275" green="0.1450980392" blue="0.15686274510000001" alpha="1" colorSpace="calibratedRGB"/>
<color key="backgroundColor" red="0.1215686275" green="0.1450980392" blue="0.15686274510000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="23 posts • 78 comments • 341 likes" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tae-yd-Jjo">
<rect key="frame" x="95" y="44" width="200" height="19"/>
<fontDescription key="fontDescription" name="Dosis-ExtraLight" family="Dosis" pointSize="15"/>
<color key="textColor" red="0.396078431372549" green="0.52941176470588236" blue="0.50588235294117645" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" red="0.396078431372549" green="0.52941176470588236" blue="0.50588235294117645" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Grace Simpson" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hwV-Zy-XbA">
<rect key="frame" x="95" y="15" width="97" height="22"/>
<fontDescription key="fontDescription" name="Dosis-Regular" family="Dosis" pointSize="17"/>
<color key="textColor" red="0.56078431370000004" green="0.62745098040000002" blue="0.6705882353" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" red="0.56078431370000004" green="0.62745098040000002" blue="0.6705882353" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bNy-hc-AKS" userLabel="Container View">
<rect key="frame" x="0.0" y="0.0" width="80" height="80"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Grace Simpson" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ffm-Pv-DOi">
<rect key="frame" x="10" y="33" width="59" height="43"/>
<rect key="frame" x="10" y="54.5" width="96.5" height="21.5"/>
<fontDescription key="fontDescription" name="Dosis-Regular" family="Dosis" pointSize="17"/>
<color key="textColor" red="0.5607843137254902" green="0.62745098039215685" blue="0.6705882352941176" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" red="0.5607843137254902" green="0.62745098039215685" blue="0.6705882352941176" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="ffm-Pv-DOi" firstAttribute="leading" secondItem="bNy-hc-AKS" secondAttribute="leading" constant="10" id="bND-9Z-Tui"/>
<constraint firstAttribute="bottom" secondItem="ffm-Pv-DOi" secondAttribute="bottom" constant="4" id="mC0-hz-8zg"/>
<constraint firstAttribute="trailing" secondItem="ffm-Pv-DOi" secondAttribute="trailing" constant="11" id="xtL-Jy-8km"/>
<constraint firstAttribute="trailing" secondItem="ffm-Pv-DOi" secondAttribute="trailing" priority="750" constant="11" id="xtL-Jy-8km"/>
</constraints>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="rMa-bq-TqE">
Expand All @@ -63,7 +67,6 @@
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<constraints>
<constraint firstItem="rMa-bq-TqE" firstAttribute="top" secondItem="gdF-wQ-JiZ" secondAttribute="top" id="DRm-1f-DUn"/>
Expand Down
6 changes: 3 additions & 3 deletions Pod/Classes/TransitionManager/TransitionManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import UIKit

private let finishTransitionValue = 1.0

open class TransitionManager {
@objc open class TransitionManager: NSObject {

fileprivate let duration: TimeInterval
fileprivate let collectionView: UICollectionView
Expand All @@ -34,7 +34,7 @@ open class TransitionManager {
self.collectionView.reloadData()
UIApplication.shared.endIgnoringInteractionEvents()
}
} as! TransitionLayout
} as! TransitionLayout
transitionLayout.layoutState = layoutState
createUpdaterAndStart()
}
Expand All @@ -50,7 +50,7 @@ fileprivate extension TransitionManager {
updater.add(to: RunLoop.current, forMode: .commonModes)
}

dynamic func updateTransitionProgress() {
@objc func updateTransitionProgress() {
var progress = (updater.timestamp - startTime) / duration
progress = min(1, progress)
progress = max(0, progress)
Expand Down

0 comments on commit a3b33bd

Please sign in to comment.