Hello, i am fairly new to Swift Playground App. So I wanted to do navigation like in the iOS or Navigation in UIKit.
My expectation when using NavigationView is well navigate to another view. Turns out, when implementing navigation view in Playground (or perhaps this is the default iPad navigation view) it look like this :
Initial launch :
After i click back it display the root navigationview but it shows it on the side :
and it initial launch is not the main/root view like in UINavigationView but it navigates to a blank view
Are there a way to disable it? i dont think i have enough time to emulate all of this in uikit
The code :
@AppStorage(megaMendungKey) var isMegaAvail: Bool = false
@AppStorage(kawungKey) var isKawungAvail: Bool = false
@AppStorage(simbutKey) var isSimbutAvail: Bool = false
var body: some View {
ZStack {
NavigationView{
Rectangle()
}
}
}
}
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello, i am very new with macos development and wanted to create a MacOS app with SwiftUI. I initiate a project with coredata checked and wanted to see how it behaves.
So how do I delete this item? It has onDelete function but not functioning
Thanks
I’m seeing unexpected UITabBar behavior on iOS 26 when Liquid Glass is enabled.
I’m using UITabBarAppearance with a dynamic UIColor to keep the selected tab bar icon and title text in sync (blue in light mode, green in dark mode).
Expected behavior
The selected tab bar icon and title text should always resolve to the same color based on the current trait collection.
Actual behavior
On initial load, the colors are correct. However, after switching light/dark mode (or any trait change that triggers a material update):
The icon keeps the configured color
The title text color is overridden by the system
Result: selected icon and title text end up with different colors
This happens even though both colors are explicitly set to the same dynamic UIColor.
Minimal reproducible example:
func applyAppearance() {
let color = UIColor { trait in
trait.userInterfaceStyle == .dark ? .green : .blue
}
self.tabBar.tintColor = color
}
Topic:
UI Frameworks
SubTopic:
UIKit
so i tried to add a simple prose onto my playground project
/*:
Roses are `UIColor.red`,
Violets are 🔵,
Swift Playgrounds are rad,
and so are you!/
but when i run my code or go to my sharedCode.swift, the prose vanish
Is there any setting that i need to do? or is it an M1 problem?
Thank you
Topic:
Developer Tools & Services
SubTopic:
Swift Playground
Tags:
Swift Playground
Swift Student Challenge
Hello Apple Platform developers. I am currently struggling with problem within the UIImagePickerController. The Navigationbar background color is somehow has no color (this appear only on the latest iOS version). Are there some kinda problem within the UIImagePickerController API?
here's how I instantiate the UIImagePIckerController
let picker = UIImagePickerController()
picker.sourceType = .photoLibrary
picker.navigationBar.isTranslucent = false
picker.navigationBar.barTintColor = .blue
picker.delegate = self
picker.modalPresentationStyle = .fullScreen
if #available (iOS 13, *) {
// let barAppearance = UINavigationBarAppearance()
// barAppearance.configureWithDefaultBackground()
// barAppearance.backgroundColor = .red
// picker.navigationBar.standardAppearance = barAppearance
// picker.navigationBar.scrollEdgeAppearance = barAppearance
let barA = UINavigationBar.appearance()
barA.tintColor = .systemPink
}
return picker
}()
as you can see, I tried to change the color and it does not appear to fix the problem
here's the problem visualization
how it supposed to look like
there's should be like a sticky white header