Currently have a running solution on iOS and watchOS. With the great news of incoming SwiftUI, the possibilities are expanding, along with our doubts about it. My question is: I have plenty of:
import WatchKit
import Foundation
class LoginInterfaceController : WKInterfaceController {
@IBOutlet weak var label: WKInterfaceLabel!
var timer: Timer!
var connection = true
...
and I want to transform these views to this:
import SwiftUI
@available(watchOSApplicationExtension 6.0, *)
struct FirstView: View {
var body: some View {
LoginView(email: "", pass: "")
}
}
@available(watchOSApplicationExtension 6.0, *)
struct LoginView : View {
@State var email: String
@State var pass: String
var body: some View {
VStack(alignment: .leading) {
...
How do I call and present the new View? Today I call something like: presentController(withName: "LoginPlease", context: text), couldn't find something for a old View present a new one...