Skip to content

Commit 15aa641

Browse files
committed
update screenshot
1 parent a1a1a39 commit 15aa641

File tree

4 files changed

+5
-24
lines changed

4 files changed

+5
-24
lines changed

AlbumTransition.gif

-1.76 MB
Loading

Classes/SDEPushAndPopAnimationController.swift

+3-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class SDEPushAndPopAnimationController: NSObject, UIViewControllerAnimatedTransi
1717
var horizontalGap: CGFloat = 0
1818
var verticalGap: CGFloat = 0
1919

20-
private let kAnimationDuration: Double = 1.0
20+
private let kAnimationDuration: Double = 0.8
2121
private let kCellAnimationSmallDelta: Double = 0.01
2222
private let kCellAnimationBigDelta: Double = 0.03
2323

@@ -60,7 +60,7 @@ class SDEPushAndPopAnimationController: NSObject, UIViewControllerAnimatedTransi
6060
let fakeCoverView = createAndSetupFakeCoverView(fromVC!, toVC: toVC!)
6161

6262
UIView.setAnimationCurve(UIViewAnimationCurve.EaseOut)
63-
let options: UIViewKeyframeAnimationOptions = [.BeginFromCurrentState, .OverrideInheritedDuration, .CalculationModeCubic, .CalculationModeLinear]
63+
let options: UIViewKeyframeAnimationOptions = [.BeginFromCurrentState, .OverrideInheritedDuration, .CalculationModeCubic, .CalculationModeCubicPaced]
6464
UIView.animateKeyframesWithDuration(duration, delay: 0, options: options, animations: {
6565

6666
self.addkeyFrameAnimationForBackgroundColorInPush(fromVC!, toVC: toVC!)
@@ -96,8 +96,7 @@ class SDEPushAndPopAnimationController: NSObject, UIViewControllerAnimatedTransi
9696
transitionContext.completeTransition(!isCancelled)
9797
})
9898

99-
default:
100-
print("No Operation")
99+
default:break
101100
}
102101
}
103102

Example/Main.storyboard

+2-20
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9059" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Ej0-qV-deg">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Ej0-qV-deg">
33
<dependencies>
44
<deployment identifier="iOS"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
66
</dependencies>
77
<scenes>
88
<!--Navigation Controller-->
@@ -13,7 +13,6 @@
1313
<navigationBar key="navigationBar" contentMode="scaleToFill" id="nmu-t3-SXH">
1414
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
1515
<autoresizingMask key="autoresizingMask"/>
16-
<animations/>
1716
</navigationBar>
1817
<nil name="viewControllers"/>
1918
<connections>
@@ -33,8 +32,6 @@
3332
<collectionView key="view" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" id="rXI-23-sPq">
3433
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
3534
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
36-
<animations/>
37-
<color key="backgroundColor" red="0.564653933" green="0.45339596269999999" blue="0.35711643100000001" alpha="1" colorSpace="calibratedRGB"/>
3835
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="lKd-Uz-WuU">
3936
<size key="itemSize" width="170" height="190"/>
4037
<size key="headerReferenceSize" width="100" height="50"/>
@@ -51,7 +48,6 @@
5148
<subviews>
5249
<label opaque="NO" userInteractionEnabled="NO" tag="-20" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TZx-5N-aFd">
5350
<rect key="frame" x="0.0" y="170" width="170" height="20"/>
54-
<animations/>
5551
<constraints>
5652
<constraint firstAttribute="height" constant="20" id="aYE-R4-3Zy"/>
5753
</constraints>
@@ -75,14 +71,11 @@
7571
</label>
7672
<imageView clipsSubviews="YES" userInteractionEnabled="NO" tag="-10" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="T4P-Sd-G6E">
7773
<rect key="frame" x="0.0" y="0.0" width="170" height="170"/>
78-
<animations/>
7974
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
8075
</imageView>
8176
</subviews>
82-
<animations/>
8377
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
8478
</view>
85-
<animations/>
8679
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
8780
<constraints>
8881
<constraint firstItem="T4P-Sd-G6E" firstAttribute="leading" secondItem="reE-m0-fza" secondAttribute="leading" id="0uN-Xs-VKQ"/>
@@ -101,13 +94,11 @@
10194
<subviews>
10295
<label opaque="NO" userInteractionEnabled="NO" tag="-10" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZGH-zl-e1J">
10396
<rect key="frame" x="8" y="14" width="330" height="21"/>
104-
<animations/>
10597
<fontDescription key="fontDescription" type="system" pointSize="17"/>
10698
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
10799
<nil key="highlightedColor"/>
108100
</label>
109101
</subviews>
110-
<animations/>
111102
</collectionReusableView>
112103
<connections>
113104
<outlet property="dataSource" destination="xDw-5x-glT" id="uUW-Hb-Cpi"/>
@@ -127,7 +118,6 @@
127118
<collectionView key="view" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" id="uzl-9Z-GQf">
128119
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
129120
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
130-
<animations/>
131121
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
132122
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="ay9-Xb-MFR">
133123
<size key="itemSize" width="150" height="150"/>
@@ -145,14 +135,11 @@
145135
<subviews>
146136
<imageView clipsSubviews="YES" userInteractionEnabled="NO" tag="-10" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="y8u-Tw-ip9">
147137
<rect key="frame" x="0.0" y="0.0" width="150" height="150"/>
148-
<animations/>
149138
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
150139
</imageView>
151140
</subviews>
152-
<animations/>
153141
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
154142
</view>
155-
<animations/>
156143
</collectionViewCell>
157144
<collectionViewCell clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="VideoCell" id="fu0-6d-z7G" customClass="SDEAdaptiveAssetCell" customModule="SDECollectionViewAlbumTransition" customModuleProvider="target">
158145
<rect key="frame" x="225" y="20" width="150" height="150"/>
@@ -163,26 +150,21 @@
163150
<subviews>
164151
<imageView clipsSubviews="YES" userInteractionEnabled="NO" tag="-10" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="avf-F6-liG">
165152
<rect key="frame" x="0.0" y="0.0" width="150" height="150"/>
166-
<animations/>
167153
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
168154
</imageView>
169155
<imageView userInteractionEnabled="NO" tag="-20" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="video_call.png" translatesAutoresizingMaskIntoConstraints="NO" id="OA0-hD-od5">
170156
<rect key="frame" x="8" y="117" width="20" height="20"/>
171-
<animations/>
172157
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
173158
</imageView>
174159
<label opaque="NO" userInteractionEnabled="NO" tag="-30" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="00:00:00" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aBm-Dc-GRs">
175160
<rect key="frame" x="92" y="120" width="50" height="14"/>
176-
<animations/>
177161
<fontDescription key="fontDescription" type="system" pointSize="11"/>
178162
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
179163
<nil key="highlightedColor"/>
180164
</label>
181165
</subviews>
182-
<animations/>
183166
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
184167
</view>
185-
<animations/>
186168
<constraints>
187169
<constraint firstItem="avf-F6-liG" firstAttribute="top" secondItem="fu0-6d-z7G" secondAttribute="top" id="DeI-P3-Elc"/>
188170
<constraint firstAttribute="bottom" secondItem="avf-F6-liG" secondAttribute="bottom" id="V6r-VJ-met"/>

0 commit comments

Comments
 (0)