How to change the status bar background color and text color on iOS 13?

You can add some conditions or use first one. Just create some extension for UIApplication. extension UIApplication { var statusBarUIView: UIView? { if #available(iOS 13.0, *) { let tag = 38482 let keyWindow = UIApplication.shared.windows.filter {$0.isKeyWindow}.first if let statusBar = keyWindow?.viewWithTag(tag) { return statusBar } else { guard let statusBarFrame = keyWindow?.windowScene?.statusBarManager?.statusBarFrame else { return … Read more

Xcode 11 & iOS13, using UIKIT can’t change background colour of UIViewController

and commented the code present in xxx scene delegate to not have the UIKit part You mustn’t do that. It is your code that needs to go in the right place. If you make a new project in Xcode 11, this code does nothing: func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { … Read more

didRegisterForRemoteNotificationsWithDeviceToken not called in ios8, but didRegister…Settings is

After a long dig I found that on 19 July, 2016 due to some error or updation at Apple’s end , the didRegisterForRemoteNotificationsWithDeviceToken method would not be called even if every condition like Internet connection , Device and the methods used are perfect. Refer to this link for confirmation https://forums.developer.apple.com/thread/52224 To verify please have a … Read more

In iOS13 the status bar background colour is different from the navigation bar in large text mode

No hacks or funkiness required here. The key is defining the desired appearance and setting this value on BOTH the nav bar’s standardAppearance AND its scrollEdgeAppearance. I have the following in the init for my base navigation controller subclass for my entire app: if #available(iOS 13.0, *) { let navBarAppearance = UINavigationBarAppearance() navBarAppearance.configureWithOpaqueBackground() navBarAppearance.titleTextAttributes = … Read more

Detecting sheet was dismissed on iOS 13

Is there a way to detect that the presented view controller sheet was dismissed? Yes. Some other function I can override in the parent view controller rather than using some sort of delegate? No. “Some sort of delegate” is how you do it. Make yourself the presentation controller’s delegate and override presentationControllerDidDismiss(_:). https://developer.apple.com/documentation/uikit/uiadaptivepresentationcontrollerdelegate/3229889-presentationcontrollerdiddismiss The lack … Read more