Post

Replies

Boosts

Views

Activity

Error appeared
Hi friends! I was developing an app, everything was working OK, but when I played the app on my iPhone connecting it via cable to the Mac an error has appeared and it says "The operation couldn't be completed. Unable to log in with account ... " "No profiles for ... were found: Xcode couldn't find any iOS app Development provisioning devices matching ..." and I'm not able to try it on my iPhone. Any suggestion or idea to fix these errors?
2
0
1.3k
Dec ’22
Different position for different elements
Hello guys! In SwiftUI is there a function to show different objects in random order or can I just do this by assigning the coordinates to each individual element? For example, suppose I have a lot of circles, and I want to position them randomly, how can I do it? Thanks in advance.
2
0
711
Apr ’23
Need a help
Hi there, I'm studying SwiftUI on my own, but unfortunately I'm still not able to write complex lines of code, or even code an app independently, which is very frustrating for me. I love coding, it's a way to express my creativity. I already have a lot of ideas, but I can't put them into practice because I feel like I don't have learned enough about this programming language. Can any of you suggest me some free courses or other resources that have also helped you in your first steps with coding?
2
0
1k
Jul ’23
Unexpected behaviour SwiftUI
Hello there, I want to create letters "rain" effect in SwiftUI, actually in this code, I would like letters to start from the top and once they reach the end of the screen, be randomly placed again all over the X axis at the top of the screen (red part in the picture) and fall linear, but unfortunately these letters make strange movements, and I don't understand why they react this way I tried to change the offset values, but it didn't work at all! :( import SwiftUI struct ContentView: View { let screenWidth = UIScreen.main.bounds.width let screenHeight = UIScreen.main.bounds.height let letters: [String] = ["A", "B", "C", "D"] @State private var yOffset: CGFloat = 0.0 var body: some View { VStack { ForEach(letters, id: \.self) { letter in Text(letter) .padding() .font(.largeTitle) .position(x: CGFloat.random(in: 0...screenWidth)) .offset(x: 0, y: yOffset) .animation(Animation.linear(duration: 5.0).repeatForever(autoreverses: false)) .onAppear { yOffset = screenHeight - 90 } } Spacer() } } } Please, If anyone knows how to fix this issue, help me.
2
0
524
Feb ’24
Forum full of spammers
Hello Apple, I would like to say that the forum is really full of spam messages saying “call” “girls” please provide to delete them because they’re very irritating. I really think that this space is for developers, for who has some doubts and so they can receive help, but despite there are some people like the spammers who doesn’t care about anything. Please Apple help us.
3
0
663
Dec ’21
iOS 15.2.1
Hello everyone! I have updated my iPhone to iOS 15.2.1 and before this update my phone after the good the sleep mode turns off, it appears a screen with written on it “Good Morning” and the weather. But since I have updated my device to iOS 15.2.1 it isn’t showing me this screen. Is it a feature that Apple has deleted or is this a bug? Thank you.
3
0
1.3k
Jan ’22
Preparation for Swift Student Challenge
Helle everyone! I was preparing for this year's Swift Student Challenge, and I have some questions about it. I know that Apple every year changes something in the Challenge, but I want to be ready. As I know for participating to the challenge I have to build a playground in Swift Playgrounds. So for that in Swift Playgrounds I have to use SwiftUI kit or build it in another way? PS: if someone knows some Swift Playgrounds tutorials please suggest me here. Thank you very much!
3
0
1k
Feb ’22
Problems with Swift Playgrounds
Hello world! I was creating a playground with Swift Playgrounds, and I created a .swift files and should connect these files to ContentView(), but when I write that file name on ContentView() it tells me "Cannot find ... in scope". Does anyone know why this error and how to fix it? Thanks in advance from heart.
3
0
1.1k
Apr ’22
Something is not working well
Hey guys! I wanted to place the circles along the screen, I took the screen size with UIScreen.main.bounds, so that the circle did not come out of the edges of the screen, and yet it is still coming out! Would any of you be able to help me on how to make the circle stay within the edges of the screen, please? I'm using SwiftUI and Swift Playgrounds. struct ContentView: View { let screenWidth = UIScreen.main.bounds.width let screenHeight = UIScreen.main.bounds.height var body: some View { Circle() .foregroundColor(.purple) .frame(width: 30, height: 30) .position( x: CGFloat.random(in: 0..<screenWidth), y: CGFloat.random(in: 0..<screenHeight) ) } }
3
0
890
Apr ’23
Device’s Orientation
Hey there! Does anyone know how I can have the same view that I have with the vertical orientation also with the horizontal orientation? Because when I change orientation from the vertical to horizontal it is all upside down, is there a way to fix it?
3
0
849
Apr ’23