Post

Replies

Boosts

Views

Activity

Reply to SceneKit in XCode
Quite hard to tell without code but if you have copied it from a swift playgrounds notebook into a app project maybe you need to setup the view to display the 3D model using a UIViewControllerRepresentable. There is a helpful video here from an ex WWDC winner: https://www.youtube.com/watch?v=5LdVQEE5wxo
Apr ’23
Reply to Questions when working with a Swift Playgrounds App
Hi, It's slightly different in Swift Playgrounds, you use the 'capabilities' editor in the playgrounds app. https://i.imgur.com/5Lp7R83.mp4 You can but there are a few limitations, there are lots of tutorials relating directly to Swift Playgrounds and CoreData online. e.g. https://www.cephalopod.studio/blog/build-an-app-on-ipad-with-swift-playgrounds-and-core-data You can use Xcode but you must make sure that your project is a swift playgrounds app project: It must not be a .xcodeproject or anything else. Your final submission should be a .swiftpm file that you then use the 'Compress' option on MacOS/iPadOS to put in a zip file that you can upload in the final form. I'd recommend testing in the actual swift playgrounds app if you have it available. Hope this is helpful, Freddie
Apr ’23
Reply to Color not working properly
I tried using absolute division rather than specifying manually calculated numbers and I think this is what you want. Let me know if not, Freddie import SwiftUI let darkorange = Color(red: 213/255, green: 131/255, blue: 120/255) struct ContentView: View { var body: some View { VStack { Rectangle() .foregroundStyle(darkorange) }.onAppear(perform:{ print(Double(213/255)) }) } }
Feb ’24
Reply to Color not working properly
I think it might be because it is based off which Display I have connected. When I do the same with google colour picker it prints similar values so I think the code is working as expected but your display/image compression is subtly changing the colours. I would not worry too much about it!
Feb ’24