UITextView work wrong - ios

I have a Chat screen which have a UITextView and it can save the text value when user input (Although I go to another view and then back to the chat screen, and the text value which input by user also saved; text value in TextView just nil when user click send button). When I make a call (it means I go to the call screen into my app, not related to the call screen of OS) and then press end call to back to the Chat screen. The problem is the text value of UITextView is nil and rarely, it just save the first letter of the long text. I don't clear text any where. Please help me to explain why?

Related

How to update a label text every day so that the user gets another predefined text every day?

I am trying to do a simple application but I am very new to Xcode and Swift.
I am trying to do an application that has the following functions:
one text
one picture
one button
By pressing the button the text changes into another text, the picture into another picture and the button disappears. All these items must be predefined.
For now, I have one text, one picture, and one button. When I press the button, everything works. The picture changes, the text too, and the button disappears.
Now, how can I update those items every day?
And is it possible to make the button disappear until the next new updated text is shown?
What I mean is that once you pressed the button the first picture will not be shown anymore but it will stuck on the second picture until the new updated text and picture comes out?
Ok so what you can do is,
When user opens your app, you can call a service and check whether you have updated text. If you get response, you can unhide the button and on click of it you can change the data.
Whenever your data gets updated, you can send a silent push notification to your app and store that data. And the next time user opens your app, you can check the data and unhide Button if data is present.

How to show keyboard programmatically in Firefox OS?

I am working on a ToDo list app wherein I keep the focus on the textbox input after the user adds a ToDo item.
Now, the problem is, when the user adds some text input and hits the add button, the focus on the textbox is lost so the keyboard disappears and then the focus gets back to the textbox. So, the keyboard disappears and appears again in a short interval. As you can imagine, this is bad UX.
How do I set the keyboard to be shown explicitly when the focus is on the input button?
I fixed it by setting the focus onto the textbox first when I click the add button then do the actual adding stuff.

visual issue with UITextField. Text past the length of the field doesnt show

This might be kind of hard to explain in a way to easily understand.. but basically I am having an issue when first tapping into a text field. When the user starts typing text, if the text reaches the end of the textfield, rather than the view scroll with the cursor as the user continues to type, the cursor just stops at the end of the textfield, but the field continues to register inputs. if the user closes the keyboard, and re-enters the textfield then it actually works as it should, scrolling along with the new letters the user types beyond the length of the textfield.
Is this some strange setting I have on my text field? Is this a bug with iOS 8? I don't even know where to begin to look to solve this issue.

Voiceover not focusing on next form field

I have a long HTML form that I am trying to make accessible to Voiceover. When I click into a field, interact with it, and then click Done on the keyboard, after a short delay Voiceover is focusing on what appears to be the field most centered on the screen rather than the next element. I tried adding explicit tabindex to all the fields and this did not help. It is not always reproducable, it sometimes works as expected.
Is this expected behavior for Voiceover? Would a user not expect "Done" to take them to the next field (seems like maybe a dumb question since there is also a "Next" button, which works fine)? But as a sighted user I know the "Done" button when I am interacting with a field just means I am done with that field and want to go on to the next action, field whatever.
"Done" dismisses editing mode on VoiceOver. A VoiceOver user would not expect that tapping "done" moves the VO cursor.

Restore state after returning from the Image Picker

I have a text field in my app, and a button to open the image picker. If I enter some text in the text field, and then go take a picture, then the text in the text field disappears after I return from the camera. What's the proper way of saving/restoring the UI state in such cases in iOS?
Hard to say without seeing code, but when the UIImagePickerController is dismissed the parent controller will call ViewWill/DidAppear. If you change the text of the UITextView in ViewWill/DidAppear then you will lose any input text.

Resources