Skip to content

Commit 4fd71f4

Browse files
committed
adding previews
1 parent 9d8abe3 commit 4fd71f4

File tree

7 files changed

+12
-15
lines changed

7 files changed

+12
-15
lines changed

Previews/animation.gif

2.54 MB
Loading

Previews/direction.gif

1.67 MB
Loading

Previews/swipe.gif

3.44 MB
Loading

Previews/undo.gif

957 KB
Loading

README.md

+12-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@ A simple view for building card like interface like [Tinder](http://www.gotinder
33

44
Preview
55
---
6-
6+
### Custom Animation
7+
![direction](Previews/animation.gif)
8+
### Custom Swipe
9+
![direction](Previews/swipe.gif)
10+
### Custom Direction
11+
![direction](Previews/direction.gif)
12+
### Undo
13+
![direction](Previews/undo.gif)
714

815
CocoaPods
916
---
@@ -38,7 +45,7 @@ swipeableView.discardViews()
3845
swipeableView.loadViews()
3946
~~~
4047

41-
You can limit the direction swiping happens using the `direction` property and register callbacks like this. Take a look at the [Custom Direction]() example for details.
48+
You can limit the direction swiping happens using the `direction` property and register callbacks like this. Take a look at the [Custom Direction](#custom-direction) example for details.
4249
~~~swift
4350
swipeableView.direction = .Left | .Up
4451
swipeableView.direction = .All
@@ -69,11 +76,11 @@ swipeableView.swipeTopView(inDirection: .Down)
6976

7077
swipeableView.swipeTopView(fromPoint: CGPoint(x: 100, y: 30), inDirection: CGVector(dx: 100, dy: -800))
7178
~~~
72-
You can also change how the direction gets interpreted by overriding the `interpretDirection` property. Take a look at the [Custom Swipe]() example for details.
79+
You can also change how the direction gets interpreted by overriding the `interpretDirection` property. Take a look at the [Custom Swipe](#custom-swipe) example for details.
7380

74-
You can create custom animation by overriding the `animateView` property. Take a look at the [Custom Animation]() example for details.
81+
You can create custom animation by overriding the `animateView` property. Take a look at the [Custom Animation](#custom-animation) example for details.
7582

76-
You can undo/rewind by storing the swiped views and insert them back to the top by calling `insertTopView`. Take a look at the [Undo]() example for details.
83+
You can undo/rewind by storing the swiped views and insert them back to the top by calling `insertTopView`. Take a look at the [Undo](#undo) example for details.
7784

7885
Requirements
7986
---

ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemo/MenuTableViewController.swift

-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import UIKit
1010

1111
class MenuTableViewController: UITableViewController {
12-
// TODO: customize animation, direction
1312

1413
let demos = ["Default", "Custom Animation", "Custom Swipe","Custom Direction", "Undo"]
1514
let viewControllers = [ZLSwipeableViewController.self,
@@ -25,7 +24,6 @@ class MenuTableViewController: UITableViewController {
2524
}
2625

2726
// MARK: - Table view data source
28-
2927
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
3028
return count(demos)
3129
}

ZLSwipeableViewSwiftDemo/ZLSwipeableViewSwiftDemo/ZLSwipeableViewController.swift

-8
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,6 @@ class ZLSwipeableViewController: UIViewController {
126126
view1.width == cardView.bounds.width
127127
view1.height == cardView.bounds.height
128128
}
129-
} else {
130-
var textView = UITextView(frame: cardView.bounds)
131-
textView.text = "This UITextView was created programmatically."
132-
textView.backgroundColor = UIColor.clearColor()
133-
textView.font = UIFont.systemFontOfSize(24)
134-
textView.editable = false
135-
textView.selectable = false
136-
cardView.addSubview(textView)
137129
}
138130
return cardView
139131
}

0 commit comments

Comments
 (0)