JSQMessagesViewController get current text - ios

Anyone know how you get the current text of a JSQMessagesViewController? When the view disappears I wan to cache the text the user has typed in so that when they return I can repopulate.

Found it.
self.inputToolbar.contentView.textView.text!

Related

How do I get the selected text from a WKWebView?

My plan is to assign the selected text to a string variable. But for now I'd like to simply print it in real time. Is there a way to retrieve and assign it in real time?
I've tried to use the answers from the below link and couldn't do much:
How do I get the selected text from a WKWebView from objective-C
Thanks in advance

GMSAutocompleteViewController want to get text which is in searchbar on search click

Hi i have used GMSAutocompleteViewController full-screen control.
https://developers.google.com/places/ios-api/autocomplete#add_an_autocomplete_ui_control
i am not able to get keyboard search click event tried by searchbar event and textfieldshouldreturn event but it is not called. i want to get text which i have typed when any location not found in google.
From the Google Places API documentation..
https://developers.google.com/places/ios-api/autocomplete#add_an_autocomplete_ui_control
Use a results controller when you want more control over the text input UI
You can not access search bar if you are using GMSAutocompleteViewController. You have to use GMSAutocompleteResultsViewController.
Make sure you have put your provideAPIKey.
try removing restriction of the api from the console
https://console.cloud.google.com/apis/credentials?project=.
it helped me.
thnx

Text input pop-up for adding to tableview

I have a table view list and an add button at the top right. The user would press the button and a text field would pop up for a user to enter a string to be the label of the new item. Nothing new or special, what you'd expect from a "new playlist" type situation.
I am looking to have the small text field input that the user would type into. Most examples have the app move to a new view controller with a text field. I simply want a little box to overlay the current view that accepts a string. I cannot find/remember the name of the text box so I cannot find examples or code.
I think you are searching for something like
https://github.com/bmancini55/iOSExamples-DockedKeyboardView
Where your UITextField would be attached on the keyboard's accessory view.
OR
http://nshipster.com/uialertcontroller/
Where you use an UIALertController with an input field. I think the second one will resolve your problem more than the first one, because you are asking for a pop-up solution.
Hope it helps

how to enter URL in textfield like facebook and show it is valid or not

I have ipad app i want that user should enter URL in textField and it should validate and should show like facebook when we enter any url it shows some page of that web or content like that in ipad any idea how to get this i know how to validate URL but how it show it like facebook page.
Attached is the screen how i want
I think you will do this in TextView not for TextField.
Some TextView do like this:
txt_note.editable=NO;
txt_note.dataDetectorTypes=UIDataDetectorTypeAll;
This will detect all URL,Phone NO,Address,etc.
OR(Method 2):
You can also see this in TextView Property in Xib file for TextView on
Right hand side.
personally i would create a customized view to show everything. You create a class URLSnapView subclass of UIView where you can place all the elements you need. a label to show the url, one for the description, a uiimageview to show your image. you can set up everything how you like it the most.
On the textfieldshouldreturn you can place the a validation method that return a BOOL value. If the result is true, it will create an instance of your customized URLSnapView with the data from your website that you will get with your NSDataDetectorType. You can also add a UIWebView to place a small area with your website that's even viewable ;)

How to auto scroll the view in ios Frank to find a particular element?

I am trying to automate an ios native app using Frank page which has a lot of text field. But i am not able to find a step which auto scroll the page under view until the element is find.
If the element is outside the view, frank is not able to fill that field. Can anybody please help?
It's simple, when a text field becomes active, create a method with as a parameter the sender (a UITextField *), and scroll to its position through the frame property.

Resources