Sync IOS cursor to app cursor.

My app controls the cursor within its text area. Upon touching the screen the ios moves the cursor when dragging. The app cursor and the IOS cursor are now out of sync. Is there a way to set the app cursor to the IOS cursor? I have checked many sources to no avail. Thanks for your help. Charlie

Thank you for sharing your post. One suggestion is to maintain a record of the mouse position you have set. This way, you can monitor whether the mouse has moved without your explicit intervention. By comparing the current position with your previous setting, you can determine if any changes have occurred. If desired, you can restore the previous position. However, I recommend that you obtain the user’s consent before overriding their settings.

I would appreciate additional details about your workflow. This will help me better understand your objectives and provide more tailored suggestions.

My app controls the cursor within its text area.

What exactly are you doing? UIKit or SwiftUI? Is your "text area" a custom view or a UITextField? There are various text input related protocols and interactions that you can use, including UITextInput, UITextSelectionDisplayInteraction, UITextInteraction, UIStandardTextCursorView etc. It may be that you need to work at a slightly lower level.

Sync IOS cursor to app cursor.
 
 
Q