Post

Replies

Boosts

Views

Activity

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
Invalid Redeclaration of Struct Name
There has been an error that sometimes repeats itself. How can I remove it? Struct Name: View { some data ... Struct ContentView: View { ... some data struct ContentView_Previews:        PreviewProvider {     static var previews: some View {         ContentView()     } } struct Name: View { // <- inwalid redeclaration of Struct Name    var body: some View {       Text("Name")    } } struct Name: View { // // <- inwalid redeclaration of Struct Name     var body: some View {        Text("Name")     } }
2
1
4.8k
Oct ’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
Closure containing a declaration cannot be used with result builder 'ViewBuilder' and Struct 'ViewBuilder' declared here (SwiftUI.ViewBuilder)
An error appears and I don't know how to solve it : Closure containing a declaration cannot be used with result builder 'ViewBuilder'. import SwiftUI Struct ContentView: View { var body: some View { // some code... struct ContentView_Previews: PreviewProvider { // <- error Closure containing a declaration cannot be used with result builder 'ViewBuilder'.     static var previews: some View {         ContentView()   } } Struct Name: View { // some code ... var body: some View { Text"some text" // some code ... Struct Name: View { var body: some View { Text"some text" Struct Name: View { var body: some View { Text"some text"
1
0
4.6k
Sep ’21
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
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)),
Replies
15
Boosts
0
Views
2.4k
Activity
Oct ’21
Cannot convert value of type '[Double]' to expected argument type 'Double'
I can't fix this error. Cannot convert value of type '[Double]' to expected argument type 'Double' let someValue = Double(SomeValue / SomeValue) // error is here
Replies
10
Boosts
0
Views
5.9k
Activity
Oct ’21
Type 'SomeView' does not conform to protocol 'View'
Hi, how can I remove this error ? Type 'SomeView' does not conform to protocol 'View' struct SomeView: View { // here is error
Replies
2
Boosts
0
Views
4.2k
Activity
Oct ’21
Invalid Redeclaration of Struct Name
There has been an error that sometimes repeats itself. How can I remove it? Struct Name: View { some data ... Struct ContentView: View { ... some data struct ContentView_Previews:        PreviewProvider {     static var previews: some View {         ContentView()     } } struct Name: View { // <- inwalid redeclaration of Struct Name    var body: some View {       Text("Name")    } } struct Name: View { // // <- inwalid redeclaration of Struct Name     var body: some View {        Text("Name")     } }
Replies
2
Boosts
1
Views
4.8k
Activity
Oct ’21
Cannot convert value of type 'Binding<[Video]>.Type' to expected argument type 'Binding<[Video]>'
Hello, how can I resolve this error ? Cannot convert value of type 'Binding<[Video]>.Type' to expected argument type 'Binding<[Video]>' NavigationLink(destination: SomeView.init(data: Binding<[Video]> ... // error is here
Replies
4
Boosts
0
Views
5.5k
Activity
Oct ’21
What example argument can I give in place of (date: Binding<Video>), ?
What example argument can I give in place of (date: Binding),?
Replies
1
Boosts
0
Views
391
Activity
Oct ’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               }             }         ```
Replies
1
Boosts
0
Views
1.1k
Activity
Sep ’21
Closure containing a declaration cannot be used with result builder 'ViewBuilder' and Struct 'ViewBuilder' declared here (SwiftUI.ViewBuilder)
An error appears and I don't know how to solve it : Closure containing a declaration cannot be used with result builder 'ViewBuilder'. import SwiftUI Struct ContentView: View { var body: some View { // some code... struct ContentView_Previews: PreviewProvider { // <- error Closure containing a declaration cannot be used with result builder 'ViewBuilder'.     static var previews: some View {         ContentView()   } } Struct Name: View { // some code ... var body: some View { Text"some text" // some code ... Struct Name: View { var body: some View { Text"some text" Struct Name: View { var body: some View { Text"some text"
Replies
1
Boosts
0
Views
4.6k
Activity
Sep ’21
Closure containing a declaration cannot be used with result builder 'ViewBuilder'
What can I do about this error ? Closure containing a declaration cannot be used with result builder 'ViewBuilder'     struct ContentView: View { // <- error is here ..... }
Replies
3
Boosts
0
Views
974
Activity
Sep ’21
Cannot find 'ContentView' in scope
How can I get rid of this error ? import SwiftUI @main struct Project_Health_calculatorsApp: App {     var body: some Scene {         WindowGroup {             ContentView() // <- error is here         }     } }
Replies
2
Boosts
0
Views
5k
Activity
Aug ’21
Binary operator '/' cannot be applied to two '() -> [Double]' operands
How can I fix it in swift 5 ? Binary operator '/' cannot be applied to two '() -> [Double]' operands
Replies
2
Boosts
0
Views
946
Activity
Aug ’21
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 = "..."                 }            }
Replies
5
Boosts
0
Views
1.2k
Activity
Aug ’21
The alpha channel in the app store icon.
Hello, how can I find the alpha channel to uncheck it, because I can't upload the build, before uploading to the app store ?
Replies
1
Boosts
0
Views
3.1k
Activity
Jun ’21
Screenshot of iPhone simulator application. , and app preview screenshot.
What is the difference between iPhone simulator screenshot from the application preview screenshot visually ? How to take iPhone simulator screenshot and app preview screenshot in Xcode 12.4 ?
Replies
0
Boosts
0
Views
462
Activity
Apr ’21