Dia Mobile?
Are there any plans of a Dia Mobile version so my tabs sync between my Mac and phone?
Are there any plans of a Dia Mobile version so my tabs sync between my Mac and phone?
Anyone got any info on the brand new firmware released? What does it change actually?
I accidentally soft resetted my Segway max g3 display by pressing brake 5 times and power button once. It then removed the option to see the remaining range of the scooter. When i tried to turn the feature on again in the app, the scooter makes a big warning sound it also does when there’s an error (a big loud BEEP) and the range isn’t ever shown. I already tried unbinding it but it doesn’t seem to help. What can I do in that situation?
As the title says any time I get a notification while my phone is unlocked I only get “Notification” as content of the notification.
Hey there! Just got F1 TV Pro for the Monaco Grand Prix and I’ve been wondering if it’s possible to see the live stream on my Apple TV and the Telemetry data on my iPad for example?
I believe it’s only for one device so I’m not sure! Thanks in advance
here is the code for yall its like the tabbar in the meta quest app where the icons get filled when you hover over the tabs.
import SwiftUI
import UIKit
struct ContentView: View {
private let tabs: [TabBarItemConfiguration] = [
.init(
title: "",
icon: "house",
selectedIcon: "house.fill",
rootView: AnyView(EmptyStateView(title: "Home"))
),
.init(
title: "",
icon: "magnifyingglass",
selectedIcon: "magnifyingglass",
rootView: AnyView(EmptyStateView(title: "Search"))
),
.init(
title: "",
icon: "bell",
selectedIcon: "bell.fill",
rootView: AnyView(EmptyStateView(title: "Alerts"))
),
.init(
title: "",
icon: "bookmark",
selectedIcon: "bookmark.fill",
rootView: AnyView(EmptyStateView(title: "Saved"))
),
.init(
title: "",
icon: "person",
selectedIcon: "person.fill",
rootView: AnyView(EmptyStateView(title: "Profile"))
)
]
var body: some View {
TabBarControllerView(tabs: tabs)
.ignoresSafeArea(.container, edges: .bottom)
}
}
struct TabBarControllerView: UIViewControllerRepresentable {
let tabs: [TabBarItemConfiguration]
func makeUIViewController(context: Context) -> UITabBarController {
let tabBarController = UITabBarController()
tabBarController.viewControllers = tabs.map(makeViewController)
return tabBarController
}
func updateUIViewController(_ uiViewController: UITabBarController, context: Context) {
if uiViewController.viewControllers?.count != tabs.count {
uiViewController.viewControllers = tabs.map(makeViewController)
return
}
guard let viewControllers = uiViewController.viewControllers else { return }
for (index, configuration) in tabs.enumerated() {
let hostingController = viewControllers[index] as? UIHostingController<AnyView>
hostingController?.rootView = configuration.rootView
configureTabBarItem(viewControllers[index].tabBarItem, with: configuration)
}
}
private func makeViewController(for configuration: TabBarItemConfiguration) -> UIViewController {
let hostingController = UIHostingController(rootView: configuration.rootView)
hostingController.title = configuration.title
configureTabBarItem(hostingController.tabBarItem, with: configuration)
return hostingController
}
private func configureTabBarItem(_ item: UITabBarItem, with configuration: TabBarItemConfiguration) {
item.title = configuration.title
item.image = UIImage(systemName: configuration.icon)
item.selectedImage = UIImage(systemName: configuration.selectedIcon)
}
}
struct TabBarItemConfiguration {
let title: String
let icon: String
let selectedIcon: String
let rootView: AnyView
}
private struct EmptyStateView: View {
let title: String
var body: some View {
ZStack {
Color(uiColor: .systemBackground)
Text(title)
.font(.title2.weight(.semibold))
}
}
}
#Preview {
ContentView()
}