-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
ContentView.swift
38 lines (34 loc) · 1 KB
/
ContentView.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import UIKit
import SwiftUI
import shared
struct ContentView: View {
var body: some View {
ZStack {
ComposeView()
.ignoresSafeArea(.all) // Compose has own keyboard handler
VStack {
gradient.ignoresSafeArea(edges: .top).frame(height: 0)
Spacer()
}
}.preferredColorScheme(.dark)
}
}
struct ComposeView: UIViewControllerRepresentable {
func makeUIViewController(context: Context) -> UIViewController {
let controller = Main_iosKt.MainViewController()
controller.overrideUserInterfaceStyle = .light
return controller
}
func updateUIViewController(_ uiViewController: UIViewController, context: Context) {
}
}
let gradient = LinearGradient(
colors: [
Color.black.opacity(0.6),
Color.black.opacity(0.6),
Color.black.opacity(0.5),
Color.black.opacity(0.3),
Color.black.opacity(0.0),
],
startPoint: .top, endPoint: .bottom
)