Skip to content

Commit f162cd2

Browse files
committedOct 17, 2015
Rename AnimatedCardsView to CardAnimationView (makes more sense with the project's name)
1 parent 1e165e9 commit f162cd2

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed
 

‎CardAnimation.xcodeproj/project.pbxproj

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
/* Begin PBXBuildFile section */
1010
D21FB6791BCED32B0021B734 /* ComponentExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D21FB6781BCED32B0021B734 /* ComponentExampleViewController.swift */; settings = {ASSET_TAGS = (); }; };
11-
D21FB67C1BCED4C20021B734 /* AnimatedCardsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D21FB67B1BCED4C20021B734 /* AnimatedCardsView.swift */; settings = {ASSET_TAGS = (); }; };
11+
D21FB67C1BCED4C20021B734 /* CardAnimationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D21FB67B1BCED4C20021B734 /* CardAnimationView.swift */; settings = {ASSET_TAGS = (); }; };
1212
D21FC1301BD0730D004D033D /* CardViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = D21FC12F1BD0730D004D033D /* CardViews.swift */; settings = {ASSET_TAGS = (); }; };
1313
FDD71FB91BBB360A00E076EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDD71FB81BBB360A00E076EE /* AppDelegate.swift */; };
1414
FDD71FBB1BBB360A00E076EE /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDD71FBA1BBB360A00E076EE /* ViewController.swift */; };
@@ -47,8 +47,8 @@
4747

4848
/* Begin PBXFileReference section */
4949
D21FB6781BCED32B0021B734 /* ComponentExampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ComponentExampleViewController.swift; sourceTree = "<group>"; };
50-
D21FB67B1BCED4C20021B734 /* AnimatedCardsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AnimatedCardsView.swift; path = AnimatedCardView/AnimatedCardsView.swift; sourceTree = "<group>"; };
51-
D21FC12F1BD0730D004D033D /* CardViews.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CardViews.swift; path = AnimatedCardView/CardViews.swift; sourceTree = "<group>"; };
50+
D21FB67B1BCED4C20021B734 /* CardAnimationView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CardAnimationView.swift; path = CardAnimation/CardAnimationView.swift; sourceTree = "<group>"; };
51+
D21FC12F1BD0730D004D033D /* CardViews.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CardViews.swift; path = CardAnimation/CardViews.swift; sourceTree = "<group>"; };
5252
FDD71FB51BBB360A00E076EE /* CardAnimation.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CardAnimation.app; sourceTree = BUILT_PRODUCTS_DIR; };
5353
FDD71FB81BBB360A00E076EE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
5454
FDD71FBA1BBB360A00E076EE /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
@@ -101,7 +101,7 @@
101101
D21FB67A1BCED47C0021B734 /* Component */ = {
102102
isa = PBXGroup;
103103
children = (
104-
D21FB67B1BCED4C20021B734 /* AnimatedCardsView.swift */,
104+
D21FB67B1BCED4C20021B734 /* CardAnimationView.swift */,
105105
D21FC12F1BD0730D004D033D /* CardViews.swift */,
106106
);
107107
name = Component;
@@ -309,7 +309,7 @@
309309
buildActionMask = 2147483647;
310310
files = (
311311
FDD71FBB1BBB360A00E076EE /* ViewController.swift in Sources */,
312-
D21FB67C1BCED4C20021B734 /* AnimatedCardsView.swift in Sources */,
312+
D21FB67C1BCED4C20021B734 /* CardAnimationView.swift in Sources */,
313313
FDD71FB91BBB360A00E076EE /* AppDelegate.swift in Sources */,
314314
D21FB6791BCED32B0021B734 /* ComponentExampleViewController.swift in Sources */,
315315
D21FC1301BD0730D004D033D /* CardViews.swift in Sources */,

‎CardAnimation/Base.lproj/Main.storyboard

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@
299299
<action selector="onDownPushed:" destination="fw9-rg-tLH" eventType="touchUpInside" id="uS1-jp-980"/>
300300
</connections>
301301
</button>
302-
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kKf-Oi-6h7" customClass="AnimatedCardsView" customModule="CardAnimation" customModuleProvider="target">
302+
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kKf-Oi-6h7" customClass="CardAnimationView" customModule="CardAnimation" customModuleProvider="target">
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>

‎CardAnimation/AnimatedCardView/AnimatedCardsView.swift ‎CardAnimation/CardAnimation/CardAnimationView.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import UIKit
1010

11-
public protocol AnimatedCardsViewDataSource : class {
11+
public protocol CardAnimationViewDataSource : class {
1212
func numberOfVisibleCards() -> Int
1313
func numberOfCards() -> Int
1414
/**
@@ -21,11 +21,11 @@ public protocol AnimatedCardsViewDataSource : class {
2121
}
2222

2323
/// View to display a list of cards featuring a flipping up and down animation effect.
24-
public class AnimatedCardsView: UIView {
24+
public class CardAnimationView: UIView {
2525

2626
// MARK: Public properties
2727
/// Data source delegate, class won't work until it's set.
28-
public weak var dataSourceDelegate : AnimatedCardsViewDataSource? {
28+
public weak var dataSourceDelegate : CardAnimationViewDataSource? {
2929
didSet { // Only start to work if delegate is set
3030
if dataSourceDelegate != nil {
3131
configure()
@@ -186,7 +186,7 @@ public class AnimatedCardsView: UIView {
186186
}
187187

188188
// MARK: Pan gesture
189-
extension AnimatedCardsView {
189+
extension CardAnimationView {
190190
@objc private func scrollOnView(gesture: UIPanGestureRecognizer) {
191191
let velocity = gesture.velocityInView(self)
192192
let percent = gesture.translationInView(self).y/150
@@ -317,7 +317,7 @@ extension AnimatedCardsView {
317317
}
318318

319319
// MARK: Card Generation
320-
extension AnimatedCardsView {
320+
extension CardAnimationView {
321321
private func generateCards() {
322322
// Clear previous configuration
323323
if cardArray.count > 0 {
@@ -379,7 +379,7 @@ extension AnimatedCardsView {
379379

380380

381381
// MARK: Handle Layout
382-
extension AnimatedCardsView {
382+
extension CardAnimationView {
383383

384384
private func relayoutSubView(subView:BaseCardView, relativeIndex:Int, animated:Bool = true, delay: NSTimeInterval = 0, fadeAndDelete delete: Bool = false) {
385385
let width = cardSize.width

‎CardAnimation/ComponentExampleViewController.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import UIKit
1010

1111
class ComponentExampleViewController: UIViewController {
1212

13-
@IBOutlet weak var cardsView: AnimatedCardsView!
13+
@IBOutlet weak var cardsView: CardAnimationView!
1414

1515
override func viewDidLoad() {
1616
super.viewDidLoad()
@@ -59,7 +59,7 @@ enum JusticeLeagueLogos: String {
5959
}
6060

6161
// MARK: - AnimatedCardsViewDataSource
62-
extension ComponentExampleViewController : AnimatedCardsViewDataSource {
62+
extension ComponentExampleViewController : CardAnimationViewDataSource {
6363

6464
func numberOfVisibleCards() -> Int {
6565
return 6

0 commit comments

Comments
 (0)