turbo-native-initializer 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +2 -2
- data/lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/NumbersViewController.swift +3 -10
- data/lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/TurboNavigationController.swift +5 -5
- data/lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/NumbersViewController.swift +3 -10
- data/lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/TurboNavigationController.swift +5 -5
- data/lib/turbo_native_initializer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e673a3e9e9ff4dcab50c3e68a188dc5b71e4660065f87b6dd45006c3e99a43b1
|
4
|
+
data.tar.gz: c8a1d14e548b6a3fcea40b78329dc5a6721081b56fd45337c669b2a5611ec6e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d06d7f520ae5c86136456042c46ef38b4c73961a47dee135b16c9d2232022545c8bb6b3a9fd197d98191a8d9745dcfda46d30a1eb076dc1c512f26d997fda0de
|
7
|
+
data.tar.gz: 3c63e69becdc8853f775cbd947714f0cb3822cbcbe35a7205afe7dfb00063665fb77791ad778215287aea5005b8e7308dee98f8ee83ff7ee1297cd45d2b0da4e
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -8,8 +8,8 @@ A turbo native project generator for iOS and Android.
|
|
8
8
|
- Added SwiftUI numbers example screen. (iOS)
|
9
9
|
- Added Jetpack Compose numbers example screen. (Android)
|
10
10
|
- Added UIAlertController to handle `data-turbo-confirm`. (iOS)
|
11
|
-
- Added presentations `
|
12
|
-
- Added visitable property in order to avoid visits. (iOS)
|
11
|
+
- Added presentations `pop`, `refresh`, `none`, `replace`, `clear-all`, and `replace-all`. (iOS)
|
12
|
+
- Added `visitable` property in order to avoid visits. (iOS)
|
13
13
|
- Added support for tab navigation. (iOS/Android)
|
14
14
|
|
15
15
|
## Installation
|
@@ -1,16 +1,9 @@
|
|
1
1
|
import SwiftUI
|
2
2
|
|
3
3
|
class NumbersViewController: UIHostingController<NumbersView> {
|
4
|
-
init() {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
required init(coder aDecoder: NSCoder) {
|
9
|
-
fatalError("init(coder:) has not been implemented")
|
10
|
-
}
|
11
|
-
|
12
|
-
override func viewDidLoad() {
|
13
|
-
super.viewDidLoad(); title = "Numbers"
|
4
|
+
convenience init(title: String) {
|
5
|
+
self.init(rootView: NumbersView())
|
6
|
+
self.title = title
|
14
7
|
}
|
15
8
|
}
|
16
9
|
|
@@ -52,7 +52,7 @@ extension TurboNavigationController {
|
|
52
52
|
|
53
53
|
private func isClearAll(_ properties: PathProperties) -> Bool {
|
54
54
|
return properties["presentation"] as? String == "clear-all"
|
55
|
-
}
|
55
|
+
}
|
56
56
|
|
57
57
|
private func isReplaceAll(_ properties: PathProperties) -> Bool {
|
58
58
|
return properties["presentation"] as? String == "replace-all"
|
@@ -75,13 +75,13 @@ extension TurboNavigationController {
|
|
75
75
|
if let viewController = properties["view-controller"] as? String {
|
76
76
|
switch viewController {
|
77
77
|
case "numbers":
|
78
|
-
return NumbersViewController()
|
78
|
+
return NumbersViewController(title: "Numbers")
|
79
79
|
default:
|
80
|
-
|
80
|
+
assertionFailure("Invalid view controller, defaulting to WebView")
|
81
81
|
}
|
82
|
-
} else {
|
83
|
-
return ViewController(url: url)
|
84
82
|
}
|
83
|
+
|
84
|
+
return ViewController(url: url)
|
85
85
|
}
|
86
86
|
|
87
87
|
private func navigate(to viewController: UIViewController, action: VisitAction, properties: PathProperties = [:]) {
|
@@ -1,16 +1,9 @@
|
|
1
1
|
import SwiftUI
|
2
2
|
|
3
3
|
class NumbersViewController: UIHostingController<NumbersView> {
|
4
|
-
init() {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
required init(coder aDecoder: NSCoder) {
|
9
|
-
fatalError("init(coder:) has not been implemented")
|
10
|
-
}
|
11
|
-
|
12
|
-
override func viewDidLoad() {
|
13
|
-
super.viewDidLoad(); title = "Numbers"
|
4
|
+
convenience init(title: String) {
|
5
|
+
self.init(rootView: NumbersView())
|
6
|
+
self.title = title
|
14
7
|
}
|
15
8
|
}
|
16
9
|
|
@@ -52,7 +52,7 @@ extension TurboNavigationController {
|
|
52
52
|
|
53
53
|
private func isClearAll(_ properties: PathProperties) -> Bool {
|
54
54
|
return properties["presentation"] as? String == "clear-all"
|
55
|
-
}
|
55
|
+
}
|
56
56
|
|
57
57
|
private func isReplaceAll(_ properties: PathProperties) -> Bool {
|
58
58
|
return properties["presentation"] as? String == "replace-all"
|
@@ -75,13 +75,13 @@ extension TurboNavigationController {
|
|
75
75
|
if let viewController = properties["view-controller"] as? String {
|
76
76
|
switch viewController {
|
77
77
|
case "numbers":
|
78
|
-
return NumbersViewController()
|
78
|
+
return NumbersViewController(title: "Numbers")
|
79
79
|
default:
|
80
|
-
|
80
|
+
assertionFailure("Invalid view controller, defaulting to WebView")
|
81
81
|
}
|
82
|
-
} else {
|
83
|
-
return ViewController(url: url)
|
84
82
|
}
|
83
|
+
|
84
|
+
return ViewController(url: url)
|
85
85
|
}
|
86
86
|
|
87
87
|
private func navigate(to viewController: UIViewController, action: VisitAction, properties: PathProperties = [:]) {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turbo-native-initializer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nixon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|