Post

Replies

Boosts

Views

Activity

Cannot find 'SecondView' in scope in swiftui error NavigationView.
How can I resolve this error ? Cannot find 'SecondView' in scope in NavigationView : NavigationView {             VStack(spacing: 30) {                 Text("...")                 Spacer()                 NavigationLink(destination: SecondView()) // Here is error {                     Text; (("..."))                         .foregroundColor(....)                 }                 Button("...") {         self.selection = "..."                 }            }
5
0
1.2k
Aug ’21
How to implement a local video in app iOS swift 5, (4 errors).
Hi, how can I solve this errors ? : Cannot find type 'Video' in scope. Cannot find '$selectedVideo' in scope. Cannot find 'ErrorView' in scope. import SwiftUI import AVKit struct ContentView: View {     @State private var selectedVideo: Video? // the error is here     var selectedVideo = video // the same error var body:some View {         NavigationView {             .fullScreenCover(item: $selectedVideo) { // error               // On Dismiss Closure             } content: { item in               makeFullScreenVideoPlayer(for: item)             }                          @ViewBuilder     func makeFullScreenVideoPlayer(for video: Video) -> some View {               // 1               if let url = video.videoURL {                 // 2                 let avPlayer = AVPlayer(url: url)                 // 3                 VideoPlayer(player: avPlayer)                   // 4                   .edgesIgnoringSafeArea(.all)                   .onAppear {                     // 5                     avPlayer.play()                   }               } else {                 ErrorView() // error               }             }         ```
1
0
1.1k
Sep ’21
Cannot convert value of type 'Binding<String>.Type' to expected argument type 'Binding<String>' error in swift 5 Xcode 12.3
I have error: Cannot convert value of type 'Binding<String>.Type' to expected argument type 'Binding<String>' I am using Xcode version 12.3, swift 5 and iOS 14.3 Occurred when grouping static containers (TextField and Text) struct ContentView_Previews: PreviewProvider {     static var previews: some View {         ContentView(text: Binding<String>) // error is here     } } How can I solve this ?
1
0
10k
Jan ’21
Type of expression is ambiguous without more context
Hello, how can I get rid of this error ? Type of expression is ambiguous without more context  var body: some View {   NavigationView { // error is here     Form {         Group {         List {         VStack {                NavigationLink(<Text>(VStack {                         ScrollView(.vertical) {                             VStack(spacing: 13) {                                 ForEach(0..<1) {_ in TextField("Enter hour",text:$checknewHour                                                                 .keyboardType(.decimalPad)                                                                 .font(.system(size: 25)), Text("\(checknewHour) $ Hour")                                                                     .foregroundColor(.purple)                                                                     .font(.system(size: 25)),TextField("Enter minute",text:$checknewMinute                                                                                                         .keyboardType(.decimalPad)                                                                                                         .font(.system(size: 25)), Text("\(checknewMinute) $ Minute")                                                                                                             .foregroundColor(.purple)                                                                                                             .font(.system(size: 25)),
15
0
2.4k
Oct ’21