Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
omarthamri authored Nov 30, 2023
1 parent 5469906 commit aa341e1
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TinderSwipingAnimation is an easy to use library written using SwiftUI to simpli
### Swift Package Manager
* File > Swift Packages > Add Package Dependency
* Add ```https://github.com/omarthamri/TinderSwipingAnimation.git```
* Select "Up to Next Major" with "1.5"
* Select "Up to Next Major" with "1.6"
### Cocoapods
```
target 'MyApp' do
Expand Down Expand Up @@ -63,6 +63,19 @@ TinderSwipingAnimation(cards: cards, buttons: buttons) { (cardModel,direction) i
}
.tinderSwipingStyle(titleColor: .red, subtitleColor: .red, titleFont: .largeTitle, subtitleFont: .largeTitle)
```
If you want to change the orientation of the text inside your card you can use options with the key orientation. we got two orientations options .horizontal and .vertical. By default the text orientation inside the card is .vertical.
```
TinderSwipingAnimation(
cards: cards,
buttons: [],
onSwipe: { (cardModel,direction) in // Closure to be called when a card is swiped.
print("Swiped \(cardModel.name) to \(direction.description)")
}, options: [
"orientation": TextOrientation.horizontal // this is setting text orientation inside card to horizontal
])
```
<Img width = 150 height = 250 src= "https://github.com/omarthamri/TinderSwipingAnimation/assets/39087448/e549fadc-88aa-4723-93cb-168c98f992a6">

## Requirements
* iOS 17.0+
## Author
Expand Down

0 comments on commit aa341e1

Please sign in to comment.