Skip to main content
Participant
October 18, 2011
Question

[AIR for iOS] TextField + emoji problems

  • October 18, 2011
  • 3 replies
  • 5761 views

Hi,


I am writing an app with a function that can save comments (contain in a multiline input TextField) of a picture and load at again next time.

Everything works fine when I try the function in PC but after I compiled the ipa and test on my iOS device (eg. iPhone), 3 problems come out.

1. The TextField can enter and show emoji characters correctly only when the textfield is focus in.

When the TextField got focus out, every emoji characters become a small black rectangle.

2. When the TextField got focus in, its zorder will be sent to highest automatically. After focus out, its zorder will become normal again.

3. The text position and leading is not exactly the same when the TextField got focus in and out.

(ie. the text paragraph poistion moves a little bit when the text field change focus)

Is there anyone facing the same problems ? And is there any solution to avoid these ?

I am using Flex SDK 4.5.1 + AIR SDK 3.0

This topic has been closed for replies.

3 replies

Participant
February 26, 2018

I have the seme problem, for input text but also for dynamic text field. How to show native emoji on iOS?

Lars Laborious
Legend
February 27, 2018

I haven't tested this, but I think you need to use StageText class. It present the user with a native text input field.

Participant
March 1, 2018

But I need to use it in a simple textfield and not in an input text. I'm creating a chat app so it is very important

Known Participant
May 24, 2017

Hi, I know this is old but did you find any solution?

Participating Frequently
October 19, 2011

The way text entry is handled on iOS, a native text input replaces the Flash text field object during editing. The Flash text field is switched back when editing is finished. I suspect this switching explains all the issues that you see.

Possibly the easiest way to avoid the problems you are having is to use a StageText object. Otherwise:

1: Try using a device font, or embedding the characters used for emojis if you are using an embedded font. I'm not sure how the emojis are rendered, but since you said that they worked fine on the PC, I'm guessing there is a font issue.

2: There's no workaround here. The native text object is always displayed in front whether you are using the TextField or the StageText object. You will have to adjust your layout to accomodate.

3: Possibly you could play with the text field and format settings, but this is probably because of differences in how the two different fields render text.