Hello and happy new year to all!
I've updated Xcode but I'm having a problem installing the iOS 17.2 Simulator.
It's the 4th time I'm trying to download it, but it gives me this error:
I've also download watchOS which is successfully installed, but I can't understand why only iOS is having some issues.
If someone knows how to fix this issue, please help me, I'm unable to use Xcode without the iOS simulator :(
Thanks in advance.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello everyone.
I would like to create a button in SwiftUI, which initially will display some text and with the click of the user will transform to a number (like initially the button displays "click me to add a number" and when I click on it'll immediately displays number "1" ). Can anyone help me with how to do this? Thanks
Hi guys
do you know how to change the text background color in SwiftUI?
.foregroundColor() changes the text color
.background(Color) changes all the background's color
So which is the command that changes only the text background color?
Thanks
Hi guys,
I need a little help with my code,
I was creating this playground and I want that the cards will stay face up if they are equal... I can't find tutorial and I tried different lines of code but it doesn't work. So please can anyone help me there? I'll thank you very much.
struct ContentView: View {
@State var flipped1 = false
@State var flipped2 = false
var body: some View {
LazyVGrid(columns: columns) {
Group {
RoundedRectangle(cornerRadius: 20)
.frame(width: 140, height: 170)
.foregroundColor(flipped1 ? Color(.systemIndigo) : .purple)
.padding()
.overlay(Text("😀").font(.system(size: 80)).rotation3DEffect(Angle(degrees: flipped1 ? 180 : 0), axis: (x: CGFloat(0), y: CGFloat(10), z: CGFloat(0))).opacity(flipped1 ? 1 : 0))
.rotation3DEffect(flipped1 ? Angle(degrees: 180): Angle(degrees: 0), axis: (x: CGFloat(0), y: CGFloat(10), z: CGFloat(0)))
.animation(.default, value: flipped1)
.onTapGesture {
flipped1.toggle()
}
RoundedRectangle(cornerRadius: 20)
.frame(width: 140, height: 170)
.foregroundColor(flipped2 ? Color(.systemIndigo) : .purple)
.padding()
.overlay(Text("😀").font(.system(size: 80)).rotation3DEffect(Angle(degrees: flipped2 ? 180 : 0), axis: (x: CGFloat(0), y: CGFloat(10), z: CGFloat(0))).opacity(flipped2 ? 1 : 0))
.rotation3DEffect(flipped2 ? Angle(degrees: 180): Angle(degrees: 0), axis: (x: CGFloat(0), y: CGFloat(10), z: CGFloat(0)))
.animation(.default)
.onTapGesture {
flipped2.toggle()
}
Hi everyone, can anyone explain me the difference between SwiftUI and UIKit?
Thank you.
Hello everyone! I recently updated my Mac to macOS Ventura, everything was updated as expected, but I'm having a problem with Xcode, I also updated Xcode, but when I clicked on it for opening it, a message appeared which says that "In order to use Xcode, you need to update to the latest version" (despite having already updated it), so, when I go on App Store for updating it again, it already says me to open, and there isn't the Update option.
I'm troubling with this problem... please if anyone knows how to fix it, help me.
Thank you.
Hello everyone!
I was putting a figure in my code when I was interrupted by this error that says "Extra argument in call", what does this sentence mean and how can I fix it?
Thanks!
Hi everyone,
do you know the command to change the position of a shape.
I want to change the position of a Rectangle and draw it to the right, this was the code that I tried:
But it shows me that blue frame around and when I click on it (since it is a button) I can’t click outside that frame. Please help me…
Thank you in advance ;)
Hi guys,
is Swift Playgrounds same as Xcode, I mean the code that I write in Xcode I can paste it into Swift Playgrounds?
Hello guys,
everything was working perfectly but I can't do a thing please help me.
I was trying to put into this Rectangle some text , I've tried several lines of code but I can't put the Text INTO the rectangle. Can someone help me?
Here's the code
import SwiftUI
import PlaygroundSupport
struct ContentView: View {
@State var flipped = false
var body: some View {
Group {
RoundedRectangle(cornerRadius: 20)
.frame(width: 140, height: 170)
.foregroundColor(self.flipped ? .red : .orange)
.padding()
.rotation3DEffect(self.flipped ? Angle(degrees: 180): Angle(degrees: 0), axis: (x: CGFloat(0), y: CGFloat(10), z: CGFloat(0)))
.animation(.default)
.onTapGesture {
self.flipped.toggle()
}
}
}
}
PlaygroundPage.current.setLiveView(ContentView())
Hello there!
Does anyone know how to apply Apple's default fonts to text in SwiftUI?
Hey there! I have a Circle, and I would like to create many on this circle and display them in random position on the screen. Is it possible?
Thanks in advance.
Hi, in this code it gives me the warning "Result of 'Text' initializer is unused" near Text("(Number)").
Does someone know what exactly mean this warning and how can I fix it?
Thanks in advance
struct NewView: View {
var body: some View {
Button {
tapped()
} label: {
Text("hello")
}
}
}
func tapped() {
Text("\(Number)")
}
struct NewView_Previews: PreviewProvider {
static var previews: some View {
NewView()
}
}
Hi everyone, can anyone tell me how can I create images for Xcode assets. Because now I want to create my own image not using the readymade.
Thank you!
Hello guys, I would like to run my code in a iOS simulator on Swift Playgrounds.
Is it possible to add iPhone simulator there?