1- # SwiftNEWKit for Apple SwiftUI
1+ # SwiftNEWKit
22<!-- [](https://github.com/1998code/SwiftNEWKit/actions/workflows/swift.yml)-->
33### An easy way for Developers to display "What's New" for the end users.
44
1111- Versioning + View History (2.0.0 or above)
1212- Instant Loading from Local Storage
1313- Simple Binding and Passing Data
14- - Simple Model, Easy to Modify and reuse
15- - Allows for ALL Use Cases including Commerical / Non-profit
14+ - Simple Model, Easy to Modify and Reuse
15+ - Allows for ALL Use Cases including Commercial / Non-profit
1616- Support Remote JSON File (3.0.0 or above)
1717- Support Firebase Real-Time Database (3.0.0 or above)
1818- Support Remote Drop Notification (3.5.0 or above)
@@ -58,7 +58,7 @@ Xcode | > 13.4 (13F17a)
5858macOS | > 12.3.1 (21E258)
5959
6060## Get Started
61- ### Full tutorial available on Medium: https://bit.ly/3NOvJB8 or below.
61+ ### Tutorial available on Medium: https://bit.ly/3NOvJB8 or below.
6262
6363### Setup
6464Steps | Description | Screenshot
@@ -71,7 +71,7 @@ Steps | Description | Screenshot
71715R | You can use remote JSON / firebase realtime database too. | Sample: https://testground-a937f-default-rtdb.firebaseio.com/0.json?print=pretty
7272
7373### Major Usage
74- 1 . Import first .
74+ 1 . Import SwiftNEWKit .
7575``` swift
7676import SwiftNEW
7777```
@@ -97,6 +97,7 @@ mesh | false | false, true |
9797``` swift
9898// Required
9999@State var showNew: Bool = false
100+
100101// Optional (5.2.0 or above)
101102@State var align: HorizontalAlignment = .center
102103@State var color: Color = .accentColor
@@ -118,6 +119,7 @@ mesh | false | false, true |
118119``` swift
119120// Simplified with default options in 5.2.0 or above
120121SwiftNEW (show : $showNew)
122+
121123// 5.1.0 or below
122124SwiftNEW (show : $showNew, align : $align, color : $color, size : $size, labelColor : $labelColor, label : $label, labelImage : $labelImage, history : $history, data : $data, showDrop : $showDrop)
123125```
@@ -128,6 +130,16 @@ Instead of using separate states, inline states work too. (No longer required af
128130SwiftNEW (show : $showNew, align : .constant (.center ), color : .constant (.accentColor ), size : .constant (" normal" ), labelColor : .constant (Color (UIColor.systemBackground )), label : .constant (" Show Release Note" ), labelImage : .constant (" arrow.up.circle.fill" ), history : .constant (true ), data : .constant (" data" ), showDrop : .constant (false ))
129131```
130132
133+ 4 . Your code should at least look similar to the following, including the minimum features and default styles.
134+ ``` swift
135+ struct ContentView : View {
136+ @State var showNew: Bool = false
137+ var body: some View {
138+ SwiftNEW (show : $showNew)
139+ }
140+ }
141+ ```
142+
131143### JSON
132144#### Structure / Model (REF)
133145* The below code is just for reference only. You don't need to copy the structure or model.
0 commit comments