Hey andrew_holmes37,
yep.
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
{
let cell = tableView.dequeueReusableCell(withIdentifier: reuseIdentifier, for: indexPath) as! SettingsCell
cell.textLabel?.text = social?.description
cell.imageView?.image = UIImage(systemName: social!.image)
cell.imageView?.tintColor = .systemBlue
cell.contentView.isUserInteractionEnabled = false
return cell
}
Post
Replies
Boosts
Views
Activity
You find the solution here:
https://stackoverflow.com/questions/64771872/ios-swift-push-notification-save-all-remote-notifications-in-a-database-also
I've discovered that this issue also occurs with other apps such as MS Office. So it has been a general iOS bug (iOS Version 14.0.1).
Does anyone else know something about this bug?
I've developed the following solution:
The Device Orientation in the Deployment Info in the settings is not set (no checkbox is checked).
AppDelegate: the one controller in this case is "SFSafariViewController"
//rotation 1
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
if let rootViewController = self.topViewControllerWithRootViewController(rootViewController: window?.rootViewController) {
print(rootViewController)
if (rootViewController is SFSafariViewController) {
// Unlock landscape view orientations for this view controller
print("unlock")
return .allButUpsideDown;
}
}
//Only allow portrait (standard behaviour)
return .portrait;
}
		
		
//rotation 2
private func topViewControllerWithRootViewController(rootViewController: UIViewController!) -> UIViewController? {
if (rootViewController == nil) { return nil }
if (rootViewController.isKind(of: UITabBarController.self)) {
return topViewControllerWithRootViewController(rootViewController: (rootViewController as! UITabBarController).selectedViewController)} else if (rootViewController.isKind(of: UINavigationController.self)) {
return topViewControllerWithRootViewController(rootViewController: (rootViewController as! UINavigationController).visibleViewController)
} else if (rootViewController.presentedViewController != nil) {
return topViewControllerWithRootViewController(rootViewController: rootViewController.presentedViewController)
}
return rootViewController
}
3. Programmatically created SFSafariViewController in the ViewController:
import SafariServices
let url = URL(string : file_url)!
let config = SFSafariViewController.Configuration()
config.entersReaderIfAvailable = true
config.barCollapsingEnabled = false
let vc = SFSafariViewController(url: url, configuration: config)
present(vc, animated: true)