SHARE
TWEET

Untitled

a guest Oct 14th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import SwiftUI
  2.  
  3. struct StreamView: View {
  4.    
  5.     @State var streamValues: [String] = []
  6.    
  7.     @State var nextValue = 0
  8.    
  9.     var body: some View {
  10.         VStack(spacing: 30) {
  11.            Spacer()
  12.            TunnelView(streamValues: $streamValues)
  13.             Button("Add") {
  14.                 self.nextValue += 1
  15.                 self.streamValues.append(String(self.nextValue))
  16.             }
  17.             Button("Remove") {
  18.                 self.streamValues.remove(at: 0)
  19.             }
  20.             Spacer()
  21.         }
  22.     }
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top