The cursor is moved by the app in a Text area. iPadOS allows touch screen cursor movement to cut, copy, paste and insert text. When text is highlighted via handle controls, and cut requested, the app fails with cursor out of bounds. The app cursor was not moved in sync with IOS. It is obvious IOS does not sync with the app cursor position and the update of the endIndex.
Post
Replies
Boosts
Views
Activity
App is Xcode swiftUI on iPad using textview. The cursor is invisible yet it moves "underneath". How to make it visible. The app textview input is button characters and coexists with a Magic Keyboard where the cursor is visible.
Am using textview : This is Apple code from DTS...not functional.
class TextStore: ObservableObject {
@Published var text = " "
let undoManager = UndoManager()
@objc func setText(_ newText: String) {
let oldText = text
text = newText
undoManager.registerUndo(withTarget: self, handler: {
$0.setText(oldText)
})
}
}
Button(b70){if textStore.undoManager.canUndo{textStore.undoManager.undo()}
Button(b71){if textStore.undoManager.canRedo{textStore.undoManager.redo()}
}
}
Using Swift/IOS/iPad Xcode. How to change button text programmatically post app start.
If the button text is X change it to Y.
How to change button attributes in iOS swift programmatically after app starts.
Autorepeat key works in Notes for iPads, iPhone , but need code in Xcode for an iOS application using buttons as text input and text editing. Could not find any code.
Thanks for replying
Charlie
How to button code "delete" text from textview backward and forward
How to button code scroll up and down.
Have created an app for IOS Swift using button values placed in a text View. Pressing any button, the value is inserted at the top left of the view. Pressing another button, the value replaces the first button value. The pointer does not advance. I have dismissed the system keyboard via responder as only button values will be used for text entry and edit.
I have spent hours looking at Apple docs, apple forums, Apple programming books and Apple videos. I have filed a TSI on 1 Sep 22 with no response. Any ideas would be deeply appreciated. Thanks...CharlieMO