Post

Replies

Boosts

Views

Activity

Bug when using ARKit with NavigationView
I want to use ARKit with NavigationView.I couldn't do it.No error will occur, but the app will stop.Procedure:1.Launch app2.Show AR View3.Return to the first screen4.Open AR View again5.App stopsPlease tell me how to fix it or an alternative.Xcode: 11.2.1 (11B500)iOS: iPadOS13.3 beta3 (Japanese)Device: iPad Pro (11-inch, 2018)I tried two types of code.(oneView is an AR view)Code:import SwiftUI import RealityKit struct ContentView: View { var body: some View { NavigationView { List { VStack { NavigationLink(destination: oneView()) { Text("Watch") } }.navigationBarTitle("AR") } }.navigationViewStyle(StackNavigationViewStyle()) } } #if DEBUG struct ContentView_Previews : PreviewProvider { static var previews: some View { ContentView() } } #endifCode:import SwiftUI struct ContentView: View { var body: some View { NavigationView { List { NavigationLink(destination: oneView()) { Text("Show Next") } } } } }
0
0
520
Nov ’19
Hide NavigationLink
When NavigationLink is displayed on iPad OS, it automatically disappears when the iPad is vertical and slidesCan be displayed.However, these are not possible if the iPad is on the side and NavigationLink is fixed.How can I hide NavigationLink so that it can be scrolled even when the iPad is on the side?
1
0
906
Nov ’19
Apple product icons for use within the app
When incorporating Apple product icons into the app, use genuine icons because their own images are prohibited, but they cannot be found in SF Symbols.You can find the same icon in "Apple Product Compatibility Icons", but using it incorrectly is prohibited.What should I do when using these icons?* Use translation
1
0
454
Apr ’20
Standard code gives an error
I chose to use the standard code created by selecting "Augmented Reality App" in Xcode and using it.But I get the error Use of unresolved identifier 'Experience'How can I solve this?ARView.swiftimport SwiftUI import RealityKit struct ARViewContainer: UIViewRepresentable { func makeUIView(context: Context) -> ARView { let arView = ARView(frame: .zero) // Load the "Box" scene from the "Experience" Reality File let boxAnchor = try! Experience.loadBox() // Add the box anchor to the scene arView.scene.anchors.append(boxAnchor) return arView } func updateUIView(_ uiView: ARView, context: Context) {} }ARKitView.swiftimport SwiftUI struct ARKitView: View { var body: some View { return ARViewContainer().edgesIgnoringSafeArea(.all) } } struct ARKitView_Previews: PreviewProvider { static var previews: some View { ARKitView() } }Experience.rcproject「Box」Seen
3
0
2.4k
Apr ’20
WidgetKit blur
The iOS 14 battery widget has blur. But if you implement them yourself in WidgetKit, you'll get 🚫 on a yellow background. How should I implement it? struct VisualEffectView: UIViewRepresentable {     var effect: UIVisualEffect?     func makeUIView(context: UIViewRepresentableContext<Self>) -> UIVisualEffectView { UIVisualEffectView() }     func updateUIView(_ uiView: UIVisualEffectView, context: UIViewRepresentableContext<Self>) { uiView.effect = effect } } struct BackgroundSunView : View {     var body: some View {         VisualEffectView(effect: UIBlurEffect(style: .dark))                        .edgesIgnoringSafeArea(.all)     } } struct WidgetKitEntryView : View {     var body: some View {         ZStack {             BackgroundSunView()             VStack {                 Text("Hello")             }         }     } }
7
0
4.4k
Jul ’20
Change the Navigation Bar color of each screen on SwiftUI.
I am creating an app that uses ARKit. I set it to display the AR screen by navigating with NavigationLink, but when the device is sideways, it does not become full screen due to the status bar. But if set in init() { } they will break the navigationview's initial screen. If you hide the NavigationBar, you cannot return to the original screen. Please tell me how to make the Navigation Bar transparent only on some screens.
0
0
720
Aug ’20