Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/AlexeyBelezeko/TBIconTransitionKit
TBIconTransitionKit is an easy to use icon transition kit that allows to smoothly change from one shape to another.
https://github.com/AlexeyBelezeko/TBIconTransitionKit
Last synced: 3 months ago
JSON representation
TBIconTransitionKit is an easy to use icon transition kit that allows to smoothly change from one shape to another.
- Host: GitHub
- URL: https://github.com/AlexeyBelezeko/TBIconTransitionKit
- Owner: AlexeyBelezeko
- License: mit
- Created: 2015-07-15T06:21:41.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-04-25T08:47:34.000Z (over 1 year ago)
- Last Synced: 2024-04-24T14:48:13.516Z (6 months ago)
- Language: Swift
- Homepage:
- Size: 58.6 KB
- Stars: 1,251
- Watchers: 47
- Forks: 152
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - TBIconTransitionKit - Easy to use icon transition kit that allows to smoothly change from one shape to another. (UI / Transition)
- awesome-ios-star - TBIconTransitionKit - Easy to use icon transition kit that allows to smoothly change from one shape to another. (UI / Transition)
README
# TBIconTransitionKit
TBIconTransitionKit is an easy to use icon transition kit that allows to smoothly change from one shape to another.
Build on UIButton with CAShapeLayers It includes a set of the most common navigation icons. Feel free to recolor the them as you like and customise shapes — adjust the line spacing, edit the line width and it's cap.[Rewriting project with ChatGPT](https://medium.com/@alexeyybelzeko/exploring-chatgpts-potential-addressing-advanced-programming-challenges-beyond-basic-games-39521ef03299)
[Animation on dribbble.com](http://drbl.in/poGN)
![](https://user-images.githubusercontent.com/1054094/234088798-763af7fd-f4d6-4b7d-ae9f-8bcc147dfff2.gif)
Both ways animated transitions:
- Menu ↔ Arrow
- Menu ↔ Cross
- Cross ↔ Plus
- Plus ↔ Minus## Usage
To run the example project, clone the repo, and open the TBIconTransitionKitExample project.
Add AnimatedButton to your SwiftUI view.
```swift
import SwiftUI
import TBIconTransitionKitstruct ContentView: View {
@State private var buttonState: AnimatedButtonState = .menuvar body: some View {
AnimatedButton(state: .menu, configure: { button in
button.backgroundColor = UIColor(hex: .black)
button.lineColor = .white
}, action: { button in
if button.currentState == .menu {
button.animationTransform(to: .arrow)
} else {
button.animationTransform(to: .menu)
}
})
}
}```
### Customize the design
- `lineHeight`
- `lineWidth`
- `lineSpacing`
- `lineColor`
- `lineCap`## Requirements
- iOS 13 or higher
## Installation
TBIconTransitionKit can be installed using Swift Package Manager.
1. In Xcode, open your project, and select File > Swift Packages > Add Package Dependency.
2. Enter the repository URL https://github.com/AlexeyBelezeko/TBIconTransitionKit and click Next.
3. Select the version you'd like to use and click Next.
4. Finally, click Finish to add the package to your project.## Author
- [AlexeyBelezeko](https://github.com/AlexeyBelezeko)
- [Oleg Turbaba](https://dribbble.com/turbaba)
- [ChatGPT]## License
TBIconTransitionKit is available under the MIT license. See the LICENSE file for more info.