iOS full texteditor implementation example - ios

I want to implement a technical editor and it on macOS i use NSTextInput and Core Text to do all the text stuff myself. But i can't find the NSTextInput equivalent on iOS? Are there examples how to avoid using WebKit or TextKit?

In iOS if you use UITextView you can use its delegate i.e UITextViewDelegate .I think its what you looking for HERE is the Apple documentation.

Related

How to set Expand and Collapse state in ios swift for VoiceOver?

I'm trying to find out how to set the Expand and Collapse state for the VoiceOver screen reader, but I can't find it in any documentation or forums.
On Android it's AccessibilityNodeInfoCompat.ACTION_EXPAND or AccessibilityNodeInfoCompat.ACTION_COLLAPSE. I would like to find the equivalent for SWIFT IOS. Could anybody help me?
UIAccessibilityTraits is how states are indicated. It's part of UIAccessibility and not part of Swift, but you can set UIAccessibilityTraits from Swift. However, iOS does not have a natively supported expand/collapse property, unlike Android. You'll have to code around it by using accessibilityHint.

How to use Swift Playgrounds-style code input keyboard/text field in normal text view?

I'm making an iPad app that lets me write swift code into a text box and save it to a document. It doesn't do any compilation or any complicated stuff like that, so I'm just looking for a way to format the code correctly in the text box (ex: code autocomplete, autoindent if possible, and maybe syntax highlighting). In short, I'd like my app's text field and keyboard to look similar to those of Swift Playgrounds.
If Apple's provided the code (or a built-in keyboard option that can do even some of this), I'd appreciate a link to it. Otherwise, how would I go about building a custom keyboard and text field (or at least disable the features like autocomplete that would get in the way)?
Thanks.
As far as I know the only way to do what you describe is to build a Swift Playgrounds app that presents a code editor window. Apple does provide documentation on creating third party iPad Swift playgrounds. I suggest looking it up on Apple's site.

iOS - Implement iMessage-like scrolling effect

Is it possible to achieve the scrolling effect like iMessage in iOS 8+ in any ordinary UITableView?
preferable using Swift
cause it looks so cool...
What you are looking for is UIKit Dynamics
I was also interested on this some time ago and I refer this link to do it.
https://www.objc.io/issues/5-ios7/collection-views-and-uidynamics/

Highlight text while Text to Speech is running

I am developing an app for ipad in which i want to add functionality as below:-
When user'll tap on play button Text to speech will start to play that Text at that time, that word will be highlighted as they are being read.
I know about in built feature of iOS but i want to do it programatically.
I searched a lot and got as below:
Link 1
Link 2
Link 3
If anyone know any API or any inbuilt framework. Let me know.
Appreciate your time.
You can make use of the brilliant text-to-speech library inbuilt with iOS 7 onwards called AVSpeechSynthesizer.
You can control the speech as well as get notifications of it's progress using the AVSpeechSynthesizer delegate methods. The method that should help you achieve your desired functionality should be the
speechSynthesizer:willSpeakRangeOfSpeechString:utterance: method.
Have a look at the AVSpeechSynthesizer as well as the AVSpeechSynthesizerDelegate API reference.
This post by Matt Thompson on NSHipster features the exact same functionality with an example.

replacing custom keyboard iOS

I'm trying to create my own keyboard for iPhone and trying to replace the default one.
There are a lot of custom keyboards in Cydia that replaces default one
so it is definately possible.
my question is
How can I create the keyboard
this would not use iOS APIs
is there any sample sources or other things that I can look around?
There is no way you could change default keyboard. and If you anyhow modify it(using private methods) apple will reject your app because it is against apple guidelines.
So the only solution to your problem is create a custom keyboard and then use it. There are few custom keyboards you can use them also :
custom-ios-keyboards
ioscustomkb
how-to-create-a-simple-keyboard-with-custom-navigation-buttons
Hope it helps you.

Resources