Post

Replies

Boosts

Views

Activity

Reply to NavigationSplitView hide sidebar toggle button
You can use the toolbar(_:for:) modifier on your sidebar view like this: .toolbar(.hidden, for: .navigationBar). You can find details in the documentation here. Here's the resulting view: struct SomeView: View { var body: some View { NavigationSplitView( columnVisibility: .constant(.all), sidebar: { Text("sidebar") .toolbar(.hidden, for: .navigationBar) }, detail: { Text("detail") } ) .navigationSplitViewStyle(.balanced) } } The first argument sets the visibility, and the second arguments specifies which bar to hide (which in your case is .navigationBar).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’23
Reply to About the age limited of Swift Students Challenge of WWDC23
I am not sure what is the minimum age in your region. However, if you are under the minimum legal age, there is still a way to apply. In the Swift Student Challenge Terms and Conditions, it is stated that you may apply under the minimum age in your relevant jurisdiction, by asking your legal guardians to send a request to the Swift Student Challenge email. Read the terms for more info (the related information is in the paragraph before Submission Requirements). If you don't receive an email response in time, I would advise you to put a note in the Comments (Optional) section of the application, as Claude31 said.
Apr ’23
Reply to May I use Xcode project to build my app for SSC?
Hi! No, you can't submit an .xcodeproj Xcode project. You must submit a .swiftpm App Playground (and zip it before you send it). Keep in mind that you should not use the playground option, but rather App Playground, when making a project. Here's how you can make one: To make an App Playground on Xcode, go to File > New > Project > iOS > App Playground. To make an App Playground in Swift Playgrounds, select the "App" button in the bottom left corner or go to File > New App Playground. Many of the Xcode project features are also available in App Playgrounds, such as adding capabilities from the Xcode's Signing & Capabilities tab. Make sure to read the rules again when submitting, to check if everything's okay. You can find them here. Good luck!
Apr ’23
Reply to On which target will Swift Student Challenge submissions run on, when choosing Xcode 14 on macOS 13?
I've noticed that Swift Playgrounds on macOS runs App Playgrounds as Mac Catalyst apps, so I suppose this would be the case for Xcode submissions too.
Replies
Boosts
Views
Activity
Apr ’23
Reply to NavigationSplitView hide sidebar toggle button
You can use the toolbar(_:for:) modifier on your sidebar view like this: .toolbar(.hidden, for: .navigationBar). You can find details in the documentation here. Here's the resulting view: struct SomeView: View { var body: some View { NavigationSplitView( columnVisibility: .constant(.all), sidebar: { Text("sidebar") .toolbar(.hidden, for: .navigationBar) }, detail: { Text("detail") } ) .navigationSplitViewStyle(.balanced) } } The first argument sets the visibility, and the second arguments specifies which bar to hide (which in your case is .navigationBar).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to How can I change the background colour of a list in SwiftUI.
Try .scrollContentBackground(.hidden) in combination with .background(.black). scrollContentBackground(_:) is a new modifier introduced last year. You can find the documentation here.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to clarification wanted for what the submission is run on
Check out this other thread - it might be helpful. From what I understand, physical iPhones won't be used, only iPads and Macs.
Replies
Boosts
Views
Activity
Apr ’23
Reply to Train Tensorflow models using Neural Engine on M2 chip
There is a Metal TensorFlow Plugin available, which accelerates model training using your Mac's GPU.
Topic: Machine Learning & AI SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to About the age limited of Swift Students Challenge of WWDC23
I am not sure what is the minimum age in your region. However, if you are under the minimum legal age, there is still a way to apply. In the Swift Student Challenge Terms and Conditions, it is stated that you may apply under the minimum age in your relevant jurisdiction, by asking your legal guardians to send a request to the Swift Student Challenge email. Read the terms for more info (the related information is in the paragraph before Submission Requirements). If you don't receive an email response in time, I would advise you to put a note in the Comments (Optional) section of the application, as Claude31 said.
Replies
Boosts
Views
Activity
Apr ’23
Reply to To pass Bool value in an enum variable of type someView
@Claude31 Equivalent closure: { newvalue in if newValue == true { self.isOn = .myTrue } else { self.isOn = .myFalse } } If it helps, think of everything that comes after the equal sign as a separate expression, like { newValue in self.isOn = (newValue ? .myTrue : .myFalse) }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to On which target will Swift Student Challenge submissions run on, when choosing Xcode 14 on macOS 13?
< (This comment is a test for a forums feedback, please ignore it. Sorry for the inconvenience.)
Replies
Boosts
Views
Activity
Apr ’23
Reply to Forum editor bug since last maintenance
Hello, Just want to add that forward slashes are also affected by this (they look HTML encoded), in case this wasn't known already. / is transformed into / when placed inside inline code here's an example: /
Replies
Boosts
Views
Activity
Apr ’23
Reply to Bundle.main.url/path cannot locate audio file.
Hi! Is your sound file placed inside the Resources folder? For me, it works fine when I place it there. If you don't see a Resources folder, add your audio files using the plus button in the bottom right corner (or simply drag and drop it). The folder will be automatically made for you. Good luck!
Replies
Boosts
Views
Activity
Apr ’23
Reply to May I use Xcode project to build my app for SSC?
Hi! No, you can't submit an .xcodeproj Xcode project. You must submit a .swiftpm App Playground (and zip it before you send it). Keep in mind that you should not use the playground option, but rather App Playground, when making a project. Here's how you can make one: To make an App Playground on Xcode, go to File > New > Project > iOS > App Playground. To make an App Playground in Swift Playgrounds, select the "App" button in the bottom left corner or go to File > New App Playground. Many of the Xcode project features are also available in App Playgrounds, such as adding capabilities from the Xcode's Signing & Capabilities tab. Make sure to read the rules again when submitting, to check if everything's okay. You can find them here. Good luck!
Replies
Boosts
Views
Activity
Apr ’23
Reply to Can anyone guide me on how to go about creating my code while im not having my macbook with me?
Maybe an iPad with Swift Playgrounds would help, if there's any available.
Replies
Boosts
Views
Activity
Apr ’23
Reply to Impossible to reply to some thread even not marked locked
I think I found a hint to the issue. It seems that I can't reply on any thread with the WWDC20 tag. Maybe threads with this tag are "locked" for non Apple-person accounts, since WWDC20 ended...
Replies
Boosts
Views
Activity
Apr ’23
Reply to App Builds fine, but will not do anything or preview
I think we need more details about this issue. Code snippets might help. To me, the diagnostics log says it may be related with your View's previews... Try to trace the issue and find what part of your code is causing it. You can undo each modification you made until you reach the state in which it works.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’23
Reply to App Builds fine, but will not do anything or preview
Ok! Is your issue fixed now? If your issue is fixed, maybe you can place this info in a new reply and mark it as correct, so others who have similar issues find this thread. Good luck with your submission!
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’23