Post

Replies

Boosts

Views

Activity

Writing tools options
Hi team, We have implemented a writing tool inside a WebView that allows users to type content in a textarea. When the "Show Writing Tools" button is clicked, an AI-powered editor opens. After clicking the "Rewrite" button, the AI modifies the text. However, when clicking the "Replace" button, the rewritten text does not update the original textarea. Kindly check and help me showButton.addTarget(self, action: #selector(showWritingTools(_:)), for: .touchUpInside) @available(iOS 18.2, *) optional func showWritingTools(_ sender: Any) Note: same cases working in TextView pfa
0
0
468
Mar ’25
Force rotation not working properly
We rotate the portrait to landscape then we force rotate to portrait app rotates but the screen seems to be divided into two parts My sample code class OrientationHelper { static func lockOrientation(_ orientation: UIInterfaceOrientationMask) { if let delegate = UIApplication.shared.delegate as? AppDelegate { delegate.orientationLock = orientation } } static func lockOrientation(_ orientation: UIInterfaceOrientationMask, andRotateTo rotateOrientation: UIInterfaceOrientation) { self.lockOrientation(orientation) DispatchQueue.main.async { UIDevice.current.setValue(rotateOrientation.rawValue, forKey: "orientation") UIViewController.attemptRotationToDeviceOrientation() } } } // Appdelegte var orientationLock = UIInterfaceOrientationMask.portrait func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask { return orientationLock }
Topic: UI Frameworks SubTopic: UIKit
2
0
362
Mar ’25
Writing tools options
Hi team, We have implemented a writing tool inside a WebView that allows users to type content in a textarea. When the "Show Writing Tools" button is clicked, an AI-powered editor opens. After clicking the "Rewrite" button, the AI modifies the text. However, when clicking the "Replace" button, the rewritten text does not update the original textarea. Kindly check and help me showButton.addTarget(self, action: #selector(showWritingTools(_:)), for: .touchUpInside) @available(iOS 18.2, *) optional func showWritingTools(_ sender: Any) Note: same cases working in TextView pfa
Replies
0
Boosts
0
Views
468
Activity
Mar ’25
Force rotation not working properly
We rotate the portrait to landscape then we force rotate to portrait app rotates but the screen seems to be divided into two parts My sample code class OrientationHelper { static func lockOrientation(_ orientation: UIInterfaceOrientationMask) { if let delegate = UIApplication.shared.delegate as? AppDelegate { delegate.orientationLock = orientation } } static func lockOrientation(_ orientation: UIInterfaceOrientationMask, andRotateTo rotateOrientation: UIInterfaceOrientation) { self.lockOrientation(orientation) DispatchQueue.main.async { UIDevice.current.setValue(rotateOrientation.rawValue, forKey: "orientation") UIViewController.attemptRotationToDeviceOrientation() } } } // Appdelegte var orientationLock = UIInterfaceOrientationMask.portrait func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask { return orientationLock }
Topic: UI Frameworks SubTopic: UIKit
Replies
2
Boosts
0
Views
362
Activity
Mar ’25