Skip to content

Commit

Permalink
Function declarations added (#2)
Browse files Browse the repository at this point in the history
Co-authored-by: Cagri Gider <[email protected]>
  • Loading branch information
cagrigider and gidercagri authored Aug 28, 2023
1 parent f358815 commit 8e223c7
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 4 deletions.
33 changes: 29 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This project is a simple progress view customizer.
## Technologies
Project is created with:
* Swift version: 5.8
* Xcode version : 14.3.1
* Xcode version: 14.3.1

## Installation
Currently only Swift Package Manager is available.
Expand All @@ -36,17 +36,42 @@ Currently, FancyProgress has 3 different customizable styles.
* ### Snake
Old snake style progress.

![Snake Progress Demo](Sources/FancyProgress/Gifs/snake.gif)
![Snake Progress Demo](Sources/FancyProgress/Gifs/snake.gif)
| Parameter Name | Description |
| ------------- | ------------- |
| maxBarCount | Number of bars. |
| spaceBetweenBars | Spacing amount between each bars. |
| barColor | Color of progress bars. |
| backgroundColor | The color of the area on which the bars stand. |
| interval | The date range over which the view should progress. |

* ### KITT
Old dream Knight Rider style progress.

![KITT Progress Demo](Sources/FancyProgress/Gifs/kitt.gif)
![KITT Progress Demo](Sources/FancyProgress/Gifs/kitt.gif)
| Parameter Name | Description |
| ------------- | ------------- |
| maxBarCount | Number of bars. |
| barColor | Color of progress bars. |
| backgroundColor | The color of the area on which the bars stand. |
| remainingOpacity | Opacity value of the not showing dots. |
| showingDotCount | The number of dots showing around center dot while moving. |
| interval | The date range over which the view should progress. |


* ### CustomImage
A progress view with selected custom image and ratio. Developers can put custom images on loading such as company logos.

![Custom Image Progress Demo](Sources/FancyProgress/Gifs/customImage.gif)
![Custom Image Progress Demo](Sources/FancyProgress/Gifs/customImage.gif)
| Parameter Name | Description |
| ------------- | ------------- |
| progressImage | The image to show while continuing. |
| widthHeightRatio | Width / Height ratio of the given image. |
| maxBarCount | Number of bars. |
| spaceBetweenBars | Spacing amount between each bars. |
| barColor | Color of progress bars. |
| backgroundColor | The color of the area on which the bars stand. |
| interval | The date range over which the view should progress. |

## Contributing

Expand Down
9 changes: 9 additions & 0 deletions Sources/FancyProgress/CustomImageProgress.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ import Foundation
import SwiftUI
import Combine

/// Progress view with given image
/// - Parameters:
/// - progressImage: The image to show while continuing.
/// - widthHeightRatio: Width / Height ratio of the given image.
/// - maxBarCount: Number of bars.
/// - spaceBetweenBars: Spacing amount between each bars.
/// - barColor: Color of progress bars.
/// - backgroundColor: The color of the area on which the bars stand.
/// - interval: The date range over which the view should progress.
public struct CustomImageProgress: View {
var progressImage: Image
var widthHeightRatio: CGFloat = 1.0
Expand Down
8 changes: 8 additions & 0 deletions Sources/FancyProgress/KITTProgress.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ import Foundation
import SwiftUI
import Combine

/// KITT style progress view
/// - Parameters:
/// - maxBarCount: Number of bars.
/// - barColor: Color of progress bars.
/// - backgroundColor: The color of the area on which the bars stand.
/// - remainingOpacity: Opacity value of the not showing dots.
/// - showingDotCount: The number of dots showing around center dot while moving.
/// - interval: The date range over which the view should progress.
public struct KITTProgress: View {
var maxBarCount: Int = 10
var barColor: Color = .white
Expand Down
7 changes: 7 additions & 0 deletions Sources/FancyProgress/SnakeProgress.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ import Foundation
import SwiftUI
import Combine

/// Snake style progress view
/// - Parameters:
/// - maxBarCount: Number of bars.
/// - spaceBetweenBars: Spacing amount between each bars.
/// - barColor: Color of progress bars.
/// - backgroundColor: The color of the area on which the bars stand.
/// - interval: The date range over which the view should progress.
public struct SnakeProgress: View {
var maxBarCount: Int = 10
var spaceBetweenBars: CGFloat = 4.0
Expand Down

0 comments on commit 8e223c7

Please sign in to comment.