But isn’t TestFlight just for publishing apps?
Post
Replies
Boosts
Views
Activity
But for creating a playground instead of an app is it ok?
ok, so can I use the Mac Swift Playgrounds too?
So Swift Playgrounds isn’t for building apps?
Now it's working.
Thanks to both of you!
Great idea, but I don’t think that it changes to much, already iPhone or other Apple products are very simple to use (brilliant colors, icons, animations, accessibility features and more). I see many old people transferring to iPhone because of its simplicity… And all the features you said are already possible, so we don’t have to make easier a thing that is already easy, doing so it will become more complex for us and also for the user
Okay thanks!
I created the structure down the "let columns" above the ContentView and I called the NumberView in the Button's action and now the error it's gone. But when I play my code and click the button it doesn't show me the text. Can't understand why...
I have tried, but it gives me this error…
I'm trying to do it in Swift Playgrounds and here's my code:
import PlaygroundSupport
let columns: [GridItem] = [GridItem(.flexible()),
GridItem(.flexible()),
GridItem(.flexible())]
struct ContentView: View {
var body: some View {
GeometryReader { geometry in
VStack {
Spacer(minLength: 290)
Text("text")
.font(.largeTitle)
ZStack {
LazyVGrid(columns: columns) {
Group {
Button {
} label: {
ZStack {
Circle()
.frame(width: 90, height: 90)
.foregroundColor(Color(.systemBlue))
.opacity(0.5)
//.position(x: geometry.size.width/2, y: -100)
Text("5")
.font(.largeTitle)
.bold()
.foregroundColor(.black)
}
.frame(width: 90, height: 90)
}
}
}
}
}
}
}
}
PlaygroundPage.current.setLiveView(ContentView())
I've created a text and I would like that the text will change on the press of the button. For example: there's a Text() witch now has written on it "text" and when I press the blue button (you can see it in my code), I want "text" to change to number "5"
I've defined the text here, how can I change the value of it?
VStack{
Text("text")
Button {
} label: {
ZStack {
Circle()
.frame(width: 90, height: 90)
.foregroundColor(Color(.systemBlue))
.opacity(0.5)
Text("5")
.font(.largeTitle)
.bold()
.foregroundColor(.black)
}
.frame(width: 90, height: 90)
}
}
Yes like a highlight... is it possible?
Ok, now is clearer thank you very much!
Hi, do you want to change your name here at Apple Developer Forums or anywhere else?
Please, be more clear asking questions...
Thank you very much!
Just for curiosity can you explain me the last line you've written, please:
Text(value == 0 ? "Some text" : String(value)) ?