Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct TestView: View {
- @Environment(\.presentationMode) var presentationMode
- @State var testBool = false
- let chatRoom = TCP_Communicator()
- var body: some View {
- VStack {
- }.onAppear() {
- name = "localhost"
- }
- }
- func load() {
- Вот пытался сделать переход
- testBool.toggle()
- _ = fullScreenCover(isPresented: $testBool, content: {
- TestOnlineView()
- })
- }
- func submit() {
- if(name != "") {
- UserDefaults.standard.set(name, forKey: "ip_adres")
- urlStr = URL(string: name)!
- chatRoom.connect(url: urlStr, port: 2323)
- chatRoom.send(message: json)
- whImg = 200
- showLoading = true
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement