Hi,
I am trying to remove the audio controls for my app on the lock screen. Since I use WKWebView, there are 3 audio tags in my html and I play and pause em via JS. However, if I do not play any sound since app launch, there are no audio controls on the lock screen. But if I play one of those 3 files (they are even less then 3 Sec sound effects e.g. for buttons) the audio controls appears on lock screen.
Note even when the sounds on pause() or not playing they were listed on the lock screen.
What I have tried so far without success
MPNowPlayingInfoCenter.default().nowPlayingInfo = [:]
and
``try audioSession.setCategory(.playback, mode: .default, options: [])
try audioSession.setActive(false, options: .notifyOthersOnDeactivation)``
and
UIApplication.shared.endReceivingRemoteControlEvents()
Another problem is that the app scales with iOS system settings "display zoom". Is there a way to deny it?
It is latest Xcode verion 16.3 and iOS 18.
I have no background mode in my Capabilities.
Nothing worked so far. Has anyone an idea?
Greetings
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello,in my current iOS Project I change the UIProgressView tintColor at runtime.When I use the same color it works great, but if I use 2 different colors e.g."progress is less than 20 percent it becomes red else it stays in init color" it does not work.The bug is that when I change at runtime the progressTintColor the progress bar becomes rounded corners and the actual progress does not match the current progress value. As I discribed by using the same logic and do not use a different color than the initial one it works.Is this a known bug in iOS?Code example:func setBatteryProgress(value: Int) {
batteryProgress.progress = Float(value) / 100
if (batteryProgress.progress <= 0.2) {
self.batteryProgress.progressTintColor = UIColor.red
//when I use here same color as in the else block it works
} else {
batteryProgress.progressTintColor = primaryColor
//when I use here same color as in the if block it works
}
}Strange behavior -> the progress is at a random value, and the left corner of the progress bar is rounded.Some has an idea about this?GreetingsTobias