Post

Replies

Boosts

Views

Activity

SwiftUI 'ignoresSafeArea(.keyboard)' not working on iOS 17
Hi, I am trying to use the .ignoresSafeArea(.keyboard) modifier on my view in SwiftUI with no luck. I have a VStack embedded in a NavigationStack, both embedded in a ZStack, and have tried it on all three without luck. I tried removing the NavStack, and same result. I also tried it directly on the TextField in my view, and still nothing. I've used this modifier before and know it should be working, so what am I doing wrong?
0
0
631
Feb ’24
iOS 15.6.1 not supported on Xcode 13.4.1
iOS 15.6.1 Incompatible on XC 13.4.1? I am attempting to run an app on my device which is running iOS 15.6.1. I have the latest version of Xcode (13.4.1), which in the release notes says it includes iOS 15.5 SDK which has support for iOS 15.6. However, Xcode seems to not be accepting my device as compatible. I tried duplicating the 15.5 folder in /iPhoneOS.Support (or whatever it's called) and renaming it to 15.6, like I read on other forums, but this did no work. If I can't find a fix I'll just install Xcode 14 when I get the chance but I'd like to figure out why it doesn't seem to be compatible when the release says it is. The deployment target in my app general settings is 15.5, it does not have an option for 15.6
3
0
3.3k
Sep ’22
Xcode 12: Alternate Storyboards for Different Devices
Hi all. I am writing a simple app which uses only one view controller and am attempting to create different storyboards for different device sizes (instead of constraining objects; I am not good at constraints). I have searched for hours on how to implement this properly. What I have done is created a different storyboard for each device family, and in AppDelegate I am determining the screen height and then loading the storyboard for that screen height. However the different storyboards are not loading and I'm not sure why. Here is a snippet of that code in AppDelegate's didFinishLaunching function: var screenHeight = UIScreen().bounds.height var storyboard: UIStoryboard storyboard = getStoryboard() let vc = storyboard.instantiateViewController(withIdentifier: "Main") self.window?.rootViewController = vc self.window?.makeKeyAndVisible() func getStoryboard() -> UIStoryboard {         var storyboard: UIStoryboard!         if screenHeight == 568.0 {             storyboard = UIStoryboard(name: "SE", bundle: nil)         }         else if screenHeight == 667.0 {             storyboard = UIStoryboard(name: "SE2", bundle: nil)         }         else if screenHeight == 736.0 {             storyboard = UIStoryboard(name: "8Plus", bundle: nil)         }         else if screenHeight == 812.0 {             storyboard = UIStoryboard(name: "11Pro", bundle: nil)         }         else if screenHeight == 896.0 {             storyboard = UIStoryboard(name: "11ProMax", bundle: nil)         }         else {             storyboard = UIStoryboard(name: "Main", bundle: nil)         }         return storyboard     } All the storyboards are in my main bundle. I don't understand why they are not instantiating. Please help ASAP
0
0
282
Dec ’20