Skip to content

Commit c0ab81d

Browse files
committed
Back button.
1 parent 4c90e43 commit c0ab81d

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

CardAnimation/Base.lproj/Main.storyboard

+10
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,14 @@
303303
<rect key="frame" x="20" y="78" width="560" height="445"/>
304304
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
305305
</view>
306+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xoa-u0-6h5">
307+
<rect key="frame" x="550" y="20" width="30" height="36"/>
308+
<fontDescription key="fontDescription" type="system" pointSize="20"/>
309+
<state key="normal" title="X"/>
310+
<connections>
311+
<action selector="onClosePushed:" destination="fw9-rg-tLH" eventType="touchUpInside" id="QsT-Xz-Alv"/>
312+
</connections>
313+
</button>
306314
</subviews>
307315
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
308316
<constraints>
@@ -313,8 +321,10 @@
313321
<constraint firstItem="kKf-Oi-6h7" firstAttribute="top" secondItem="srb-xo-nyT" secondAttribute="bottom" constant="8" id="F9y-3Q-b2c"/>
314322
<constraint firstItem="QO0-0n-sl7" firstAttribute="top" secondItem="31I-9l-4R6" secondAttribute="bottom" constant="27" id="SCM-te-fwb"/>
315323
<constraint firstItem="kKf-Oi-6h7" firstAttribute="centerY" secondItem="DF4-xn-P6z" secondAttribute="centerY" id="Yos-l1-yKM"/>
324+
<constraint firstItem="xoa-u0-6h5" firstAttribute="top" secondItem="vLI-t1-AxW" secondAttribute="bottom" id="pP0-jp-HoI"/>
316325
<constraint firstItem="kKf-Oi-6h7" firstAttribute="centerX" secondItem="DF4-xn-P6z" secondAttribute="centerX" id="tPw-bD-WOQ"/>
317326
<constraint firstItem="srb-xo-nyT" firstAttribute="top" secondItem="vLI-t1-AxW" secondAttribute="bottom" constant="8" id="u3y-pB-szd"/>
327+
<constraint firstAttribute="trailingMargin" secondItem="xoa-u0-6h5" secondAttribute="trailing" id="uQE-Vj-ltI"/>
318328
<constraint firstItem="31I-9l-4R6" firstAttribute="centerX" secondItem="DF4-xn-P6z" secondAttribute="centerX" id="up0-y4-wzT"/>
319329
</constraints>
320330
</view>

CardAnimation/ComponentViewController.swift

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ class ComponentViewController: UIViewController {
3333
cardsView.flipDown()
3434
}
3535

36+
@IBAction func onClosePushed(sender: AnyObject) {
37+
self.dismissViewControllerAnimated(true, completion: nil)
38+
}
39+
3640
}
3741

3842
// MARK: - AnimatedCardsViewDataSource

0 commit comments

Comments
 (0)