Ios swift – Can't show alert to user
In an iOS app, when the user denies location permission, I want to show an alert to give permission. I debug it and code works successfully but I can't see any alert in the simulator. I start the program and…
In an iOS app, when the user denies location permission, I want to show an alert to give permission. I debug it and code works successfully but I can't see any alert in the simulator. I start the program and…
I'm using UICollectionViewCompositionalLayout with UICollectionViewCell class. Also I have a DownloadManager class. I want to download a file after clicking a cell. I'm using didSelectItemAt method to star downloading. And I'm using progressView and title in UICollectionViewCell class to show…
App seems to be crashing in UIKit when it is running on iPad. Has anyone experienced this crash. Here is crash report. Not able to reproduce consistently. adding a root view controller <UISplitViewController: 0x10b527030> as a child of view controller:<UISplitViewController:…
I just noticed when building my app with Xcode 16 (iOS 18) that the screen flashes briefly when switching tabs (using a standard UITabBarController). Have any one of you experienced it? I have searched documentation and can not find anything…
In XCode, is there a way to remove the "hide-keyboard" button ? I'm trying to prevent the keyboard from hiding when the hide-keyboard button is tapped and can only be hidden when the done button is tapped. The only options…
Using storyboards, I have a button that modally presents a UINavigationController (with a UITableViewController as the root) that allows the user select rows to push additional views on the stack. The user can navigate down a hierarchy until they find…
I have a static quick action with the following setup. Setup quick action UIApplicationShortcutItemIconSymbolName = "alarm" UIApplicationShortcutItemType = "com.yocto.xyz.action" UIApplicationShortcutItemTitle = "Hello" However, when I tap on it, none of the following function is executed @main class AppDelegate: UIResponder, UIApplicationDelegate…
I would like to open bottom sheet with custom option and not medium or large detents.I checked in SwiftUI there is API called .fraction but couldn't find similar API in UIKit. SwiftUI Text("Detail") .presentationDetents([.fraction(0.1)]) UIKit if let sheet = viewControllerToPresent.sheetPresentationController…
I am trying to switch constraints in my layout. In my project I use UIKit with storyboards. For some reason, in iOS 18 simulator, form sheet presentation resets constraints which were setup in my storyboard. I have two constraints where…
I have this code: public enum DeviceUtil { public static var isPhone: Bool { return UIDevice.current.userInterfaceIdiom == .phone } } And I got warning saying UIDevice API has to be on the main actor. I have a few places where…