Post

Replies

Boosts

Views

Activity

Reply to Unexpected behaviour SwiftUI
I've tried this way, but actually it stops on a random point in the X-axis. I really can't understand how to figure out this. import SwiftUI struct ContentView: View { let screenWidth = UIScreen.main.bounds.width let screenHeight = UIScreen.main.bounds.height let letters: [String] = ["A"] @State private var xOffset: CGFloat = 0.0 @State private var yOffset: CGFloat = 0.0 @State var animation = false var body: some View { ForEach(letters, id: \.self) { letter in Text(letter) .padding() .font(.largeTitle) .offset(x: xOffset, y: yOffset) .animation(Animation.linear(duration: 1.0).repeatForever(autoreverses: false)) .onAppear { yOffset = CGFloat.random(in: 0...screenHeight) } } Spacer() } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’24
Reply to Different position for different elements
Thanks @Claude31 I tried this way but it gives an error struct ContentView: View { var body: some View { MyCircle(radius: 3) // Static method 'buidBlock' requires that 'MyCircle' conform to 'View' } } struct MyCircle { var radius: Int var pos: CGPoint { let x = (0...500).randomElement()! let y = (0...500).randomElement()! return CGPoint(x: x, y: y) } } What did I do wrong?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’23
Reply to Error appeared
Now it says me this: "Could not launch “App” The operation couldn’t be completed. Unable to launch ...-icloud.com because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user."
Dec ’22
Reply to Getting Started
Hello! So you’d like to learn SwiftUI, the programming language that allows you to build applications for Apple platforms. Am I right? To get started with Swift, I highly recommend to take a look at the Everyone Can Code book series on Apple Books, to start learning something about programming in Swift. There are on many topics and they are all free, so you can just go to Books and download them and start learning! Here's the link for the books [https://books.apple.com/us/book/everyone-can-code-adventures/id1514850778) Have a great day!
Aug ’22
Reply to Build a website
Thanks @Starfia. So can I still use the TextEdit for building a complex website (with animations, images, videos, etc.) and no need to go on Google and write for an app to build the page? And can you tell me how to run it with the browser? Then how can I put this website on the Internet? Sorry for too many questions, but this thing is new to me. Thanks (again).
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’22
Reply to Unexpected behaviour SwiftUI
I've tried this way, but actually it stops on a random point in the X-axis. I really can't understand how to figure out this. import SwiftUI struct ContentView: View { let screenWidth = UIScreen.main.bounds.width let screenHeight = UIScreen.main.bounds.height let letters: [String] = ["A"] @State private var xOffset: CGFloat = 0.0 @State private var yOffset: CGFloat = 0.0 @State var animation = false var body: some View { ForEach(letters, id: \.self) { letter in Text(letter) .padding() .font(.largeTitle) .offset(x: xOffset, y: yOffset) .animation(Animation.linear(duration: 1.0).repeatForever(autoreverses: false)) .onAppear { yOffset = CGFloat.random(in: 0...screenHeight) } } Spacer() } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’24
Reply to Error installing iOS 17.2 Simulator Xcode
Can anyone help me?
Replies
Boosts
Views
Activity
Jan ’24
Reply to MacOS?
What are you referring to?
Replies
Boosts
Views
Activity
Aug ’23
Reply to Unexpected Error
Ok thank you very much all ;))
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to Device’s Orientation
@Claude31 I mean I have multiple objects on my screen but when I rotate the screen vertically it doesn’t show me all the objects.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to Something is not working well
Ok thanks! And in case of an image, how does it work?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to Different position for different elements
Thanks @Claude31 I tried this way but it gives an error struct ContentView: View { var body: some View { MyCircle(radius: 3) // Static method 'buidBlock' requires that 'MyCircle' conform to 'View' } } struct MyCircle { var radius: Int var pos: CGPoint { let x = (0...500).randomElement()! let y = (0...500).randomElement()! return CGPoint(x: x, y: y) } } What did I do wrong?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to What can I use for 2D assets?
Can anyone reply me, pls?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to Some questions for the Swift Student Challenge
Ok thank you very much ☺️🤞🏼
Replies
Boosts
Views
Activity
Apr ’23
Reply to Error appeared
Now it says me this: "Could not launch “App” The operation couldn’t be completed. Unable to launch ...-icloud.com because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user."
Replies
Boosts
Views
Activity
Dec ’22
Reply to Getting Started
Hello! So you’d like to learn SwiftUI, the programming language that allows you to build applications for Apple platforms. Am I right? To get started with Swift, I highly recommend to take a look at the Everyone Can Code book series on Apple Books, to start learning something about programming in Swift. There are on many topics and they are all free, so you can just go to Books and download them and start learning! Here's the link for the books [https://books.apple.com/us/book/everyone-can-code-adventures/id1514850778) Have a great day!
Replies
Boosts
Views
Activity
Aug ’22
Reply to Build a website
Thanks @Starfia. So can I still use the TextEdit for building a complex website (with animations, images, videos, etc.) and no need to go on Google and write for an app to build the page? And can you tell me how to run it with the browser? Then how can I put this website on the Internet? Sorry for too many questions, but this thing is new to me. Thanks (again).
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’22
Reply to Build a website from scratch
Hey guys, can someone help me?
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’22
Reply to Xcode issue
Alright! Thanks a lot!!
Replies
Boosts
Views
Activity
Jun ’22
Reply to Xcode issue
I'm using macOS Ventura and on App Store is written Xcode 13.4.1, which I can't open.
Replies
Boosts
Views
Activity
Jun ’22