I want to set the variable „selectedPlaceName“ before setting „showingPopover“ > Can you explain what you want to achieve? If the order of setting the variables is the purpose of you, you are doing it as you describe. If your actual purpose is sort of using selectedPlaceName in the popover, you may need to show more code.
Post
Replies
Boosts
Views
Activity
Please try something like this:
import SwiftUI
struct HeartTextSquareView: View {
@State private var name: String = ""
@State private var adresse: String = ""
@State var telefonnummern: [String] = [] //<-
@State var something: String = ""
var body: some View {
VStack {
List {
TextField("Name/Vorname", text: $name)
TextField("Adresse", text: $adresse)
ForEach($telefonnummern, id: \.self) {$telefonnummer in
TextField("Telefonnummer", text: $telefonnummer)
}
Button(action: {
telefonnummern.append("")
}) {
Image(systemName: "plus.circle.fill")
.foregroundColor(Color(.systemGreen))
}
}
} //End VStack
}//End body
}//End `HeartTextSquareView`
When you want variable number of UI elements, you need to prepare a variable each element of which represents each UI element.
Flutter is not a framework of Apple's. You would get a better chance to get better responses sooner if you visit the supporting site or a community site of it.
What I do not understand is that your code shown does not contain any TextField. You should better show more code even if it might not be perfect. That would explain what you want to do better than the too simple example.
the issue is coming from unity? > It may be or may not be. Better find the right place and you would get the right answer sooner.
Unity is not a framework of Apple's. You may get a better chance to receive better responses sooner if you visit the supporting site or a community site of Unity.
So, have you contacted Apple Developer Program Support?
Can you clarify what you want to ask?
(Duplicate answer removed)
Sharing some info about iOS bugs is not a bad thing, but the right place to report bugs is the Feedback Assistant. Have you already sent a bug report?
No such functionalities in Apple's frameworks. Visit Microsoft's site which explains the data format of Excel and do all by yourself (maybe some work of years), or find a third party library.
So what?
Can you share your code? It would be much better if the code contains some example data.
Seems you are right and I cannot find a code snippet icon { } tapping +. (iPad mini 6)
I guess Apple's designers of Swift Playgrounds have chosen some more specific set of code snippets for App project, rather than basic code snippets found in Playgrounds projects. Maybe they might be expecting that the users of App projects would be more experienced than users of Playground projects.
You may send a feature request using the Feedback Assistant.
What am I doing wrong?
In your code, you are making viewModel a local variable, so it will be released just after print("Yeah...").
Please try something like this:
class ViewController: UIViewController {
// MARK: - Variables
private var cancellableSet: Set<AnyCancellable> = []
var viewModel: ViewModel! //<-
// MARK: - Life cycle
override func viewDidLoad() {
super.viewDidLoad()
let urlStr = "https://api.github.com/repos/ReactiveX/RxSwift/events"
viewModel = ViewModel(urlStr: urlStr, waitTime: 2.0) //<- No `let` here`
viewModel.fetchData(urlText: viewModel.urlStr, timeInterval: viewModel.waitTime)
.sink { completion in
print("complete")
} receiveValue: { dataSet in
print("count: \(dataSet)")
}
.store(in: &cancellableSet)
print("Yeah...")
}
}