Skip to content

Commit 4d402d0

Browse files
authored
Update README.md
1 parent 8f21b6c commit 4d402d0

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Provide an easy way for Apple Developers to Show "What's New" to the end users.
1616
- Simple Binding and pass data
1717
- Simple Model, easy to modify
1818
- Open Source for all developers
19+
- Support Remote JSON File (>3.0.0)
20+
- Support Firebase Real Time Database (>3.0.0)
1921

2022
## Version
2123
![GitHub release (latest by date)](https://img.shields.io/github/v/release/1998code/SwiftNEWKit?color=g&label=STABLE&style=for-the-badge)
@@ -49,7 +51,8 @@ Steps | Description | Screenshot
4951
2 | Select Project | <img width="174" alt="CleanShot 2022-06-11 at 17 39 48@2x" src="https://user-images.githubusercontent.com/54872601/173182523-6a24c67a-8f27-4ef7-a3f4-ea63cfd8436f.png">
5052
3 | Select Package Dependencies | <img width="309" alt="CleanShot 2022-06-11 at 17 39 53@2x" src="https://user-images.githubusercontent.com/54872601/173182526-e5660b7f-c50c-4173-81f5-83c10c514659.png">
5153
4 | Click + and paste <code>https://github.com/1998code/SwiftNEWKit</code> to the searchbox | <img width="614" alt="CleanShot 2022-06-11 at 17 39 32@2x" src="https://user-images.githubusercontent.com/54872601/173182527-2a151198-7ac0-4735-8257-11580ada3d5e.png">
52-
5 | Create a new file called `data.json` | You may copy the [JSON sample](https://github.com/1998code/SwiftNEWKit#sample) below.
54+
5L | Create a new local file called `data.json` | You may copy the [JSON sample](https://github.com/1998code/SwiftNEWKit#sample) below.
55+
5R | You can use remote json / firebase realtime database too. |
5356

5457
### Major Usage
5558
1. Import first.
@@ -58,7 +61,7 @@ import SwiftNEW
5861
```
5962
2. Then, paste this code inside `body` or any `some View`.
6063
```swift
61-
SwiftNEW(show: $showNew, align: $align, color: $color, size: $size, labelColor: $labelColor, label: $label, labelImage: $labelImage)
64+
SwiftNEW(show: $showNew, align: $align, color: $color, size: $size, labelColor: $labelColor, label: $label, labelImage: $labelImage, history: $history, data: $data)
6265
```
6366

6467
### State
@@ -71,6 +74,8 @@ size | "normal" | "invisible", "mini", "normal" |
7174
labelColor | Color(UIColor.systemBackground) | All Colors Supported | Color
7275
label | "Show Release Note" | All Strings | String
7376
labelImage | "arrow.up.circle.fill" | All SF Symbols | String
77+
history | true | true, false | Bool
78+
data | "data" or "https://.../{}.json" | "{LOCAL_JSON_FILE}" or Remote | String
7479
##### Samples:
7580
```swift
7681
@State var showNew: Bool = false
@@ -80,6 +85,9 @@ labelImage | "arrow.up.circle.fill" | All SF Symbols |
8085
@State var labelColor: Color = Color(UIColor.systemBackground)
8186
@State var label: String = "Show Release Note"
8287
@State var labelImage: String = "arrow.up.circle.fill"
88+
// 3.0 Update
89+
@State var history: Bool = true
90+
@State var data: String = "data"
8391
```
8492

8593
### JSON
@@ -98,7 +106,8 @@ public struct Model: Codable, Hashable {
98106
}
99107
```
100108
#### Sample
101-
* Copy the JSON sample to `data.json` file (If you don't have it, simply create a new one.)
109+
Copy the JSON sample to `data.json` file (If you don't have it, simply create a new one.)
110+
102111
![68747470733a2f2f76616c696461746f722e737761676765722e696f2f76616c696461746f723f75726c3d68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f4f41492f4f70656e4150492d53706563696669636174696f6e2f6d61737465722f6578616d706c65732f76](https://user-images.githubusercontent.com/54872601/173190828-8ee763b9-4e33-4231-92ac-eb81b556c462.png)
103112
```json
104113
[

0 commit comments

Comments
 (0)