Hello,
I seem to be unable to change TabView's background color (not the bar, but the background of the entire TabView), no matter what I try.
What I am looking for:
To make the TabView's background clear.
My code:
TabView(selection: $activeScreen) {
Screen1()
.tabItem {
Label("Menu", systemImage: "list.dash")
}
}
Screen1 is defined as:
struct Screen1: View {
var body: some View {
VStack {
Text("Hello")
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
}
}
What I have tried, based on suggestions online:
Changing UITabBarAppearance in init(), and .onAppear()
TabView().background(.clear)
In all cases, the TabView's background remains either white or black, depending on the device's theme. I can change the background behind it by placing it in a ZStack, but that is not what I am looking for, I want the background itself to be clear.
The only way that TabView will honor .background(.clear) is if I add the following:
.tabViewStyle(.page)
.indexViewStyle(.page(backgroundDisplayMode: .always))
But this changes the style of the TabView, which is not the desired behavior.
Any help would be greatly appreciated, thank you!
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello,
I am getting the following error while attempting to run my LockedCameraCapture compatible app on an iOS 15 device:
dyld[434]: Library not loaded: '/System/Library/Frameworks/LockedCameraCapture.framework/LockedCameraCapture'
Referenced from: '/private/var/containers/Bundle/Application/.../MyApp.app/MyApp.debug.dylib'
Reason: tried: '/System/Library/Frameworks/LockedCameraCapture.framework/LockedCameraCapture' (no such file)
Of course iOS 15 doesn't have the library for LockedCameraCapture, but I have had no issue including Lock Screen Widgets (which require iOS 16), so I am not sure why the error is popping up.
Thank you!
Topic:
Media Technologies
SubTopic:
Photos & Camera
Hello,
I apologize if the answer is obvious but I'm having a hard time figuring this one out.
Let's say the user taps an "Edit" button in my LockedCameraCaptureSession. The extension calls:
activity.userInfo = ["ActivityKey": "ID"]
try await session.openApplication(for: activity)
Can I retrieve, in my application, the data stored in activity.userInfo (lets say, a flag "open editor"), or is data passing exclusively handled via appContext of CameraCaptureIntent?
Thank you!
Topic:
Media Technologies
SubTopic:
Photos & Camera
Hello,
I am trying to get my camera app to launch from the Lock Screen, and see that calls to UIApplication.shared are not allowed. In my app, I have:
UIApplication.shared.isIdleTimerDisabled = true
Which is causing this compile time error:
'shared' is unavailable in application extensions for iOS: Use view controller based solutions where appropriate instead
I do not believe there is a view controller based solution for this. Is there a flag I can wrap around the call so that the compiler knows it won't be used during an application extension?
Thank you!
Topic:
Media Technologies
SubTopic:
Photos & Camera
Hello,
I have followed the Creating a camera experience for the Lock Screen guide, and can now launch my app using the iPhone 16's new camera button.
That said, after about 10 seconds the app is force-closed by the OS, with the only message appearing in the console: "Terminated due to signal 9".
This error does not happen when:
launching the app via physical camera button when device is locked
launching the app by tapping the icon on the Home Screen
It is only happening when:
launching the app via physical camera button from the Home Screen when device is unlocked
Any ideas?
Thank you!
Topic:
Media Technologies
SubTopic:
Photos & Camera
Hello,
I seem to be having an issue assigning my Capture Extension an icon. It works fine using a system icon, for example:
Image(systemName: "star")
But it fails when I use my custom icon, such as:
Image(uiImage: UIImage(named: "widget-icon")!)
The "widget-icon" is located in both my Assets collection and the widget folder for good measure, and yet, my Widget always has a "?" icon.
I am able to use "widget-icon" just fine for other Lock Screen widgets, but it is not working for the Camera Extension Widget.
Any thoughts?
Thank you for your help!
Topic:
Media Technologies
SubTopic:
Photos & Camera
Hello,
I noticed a blip in the viewfinder of the AVCamFilter sample (here: https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/avcamfilter_applying_filters_to_a_capture_stream)
when disabling device rotation animation. Only modifications were to viewWillTransition in CameraViewController where I added UIView.setAnimationsEnabled(true) in coordinator.animate() and UIView.setAnimationsEnabled(false) at the end of the function.
Thank you so much for the assistance!