Hi,
In my app, I use display.newText() to create a multiline text, and I specified a width and set height to 0 as it is explained in the documentation below.
Optional arguments to enable multi-line text. Text will be wrapped at width and be cropped at height. Set height to 0 and the height will change according to amount of text.
I currently test my app on multiples devices with different iOS versions.
Everything is ok… Since iOS 7!
I noticed that with iOS 7, on any devices, it doesn’t work :
No more multilines, only one line is displayed and cut at width pixels.
Thanks for your help
Best,
Olivier
Hi @oromanetti,
Are you setting both width and height to 0? I think the width should be something greater than 0… it’s only height that may be set to 0 to give a “flexible height” box.
Best regards,
Brent
Hi Brent
Thank you for your mail.
No I didn’t set width to 0.
My width parameter value is 400.
As I said, everything worked fine before iOS 7.
With iOS 7 devices, the “flexible height” doesn’t work anymore for me.
Anyone with same problem?
Best
Olivier
Hi Olivier,
Which build # are you using for this test? Can you also show me the code you’re using?
Hi Brent
I use Version 2013.1218 (2013.9.28)
I did a very simple example to show you my problem :
local myText = "The 'clef' at the beginning of the staff determines the names of the notes." local helpText = display.newText(myText, 0, 0, 200, 0, "Arial", 16 ) helpText:setReferencePoint(display.CenterReferencePoint) helpText:setTextColor(255) helpText.x = display.contentCenterX helpText.y = 50
Everything work fine in the simulator, you can see all the text.
If you try this little example on a device with iOS 7 you will see that the text is cut, sometimes on the first line, sometimes on the second line.
For me, on my iPad Retina with iOS 7, I can see on my screen :
____________________________
The ‘clef’ at the beginning of
the staff determines the
____________________________
It’s a big problem for me because I use a lot this “flexible height” stuff on my app.
Thanks for your help.
Best
Olivier
Hi Olivier,
I tried the exact code you show on my iPad Retina 4th-gen with iOS7, and the text appears as expected… it’s not cut off, and I can read the entire sentence.
I used Corona build #1225
Retina iPad
iOS 7.0.2
config.lua setup at 640x960 “letterbox”
You may consider using non-flexible boxes with a very high height setting (like 2000), put the text inside, and then align them along a top-center point, not a center point. You would need to experiment with this, however, and see how it works in your app.
Best regards,
Brent
Thank you Brent 
I will try with the latest version of Corona build.
I hope It will be ok.
Thanks again
Best regards,
Olivier
Brent, I’v just installed Version 2013.1242 (2013.10.24)
Everything is OK now :lol:
Thanks!
Olivier
Hi @oromanetti,
Are you setting both width and height to 0? I think the width should be something greater than 0… it’s only height that may be set to 0 to give a “flexible height” box.
Best regards,
Brent
Hi Brent
Thank you for your mail.
No I didn’t set width to 0.
My width parameter value is 400.
As I said, everything worked fine before iOS 7.
With iOS 7 devices, the “flexible height” doesn’t work anymore for me.
Anyone with same problem?
Best
Olivier
Hi Olivier,
Which build # are you using for this test? Can you also show me the code you’re using?
Hi Brent
I use Version 2013.1218 (2013.9.28)
I did a very simple example to show you my problem :
local myText = "The 'clef' at the beginning of the staff determines the names of the notes." local helpText = display.newText(myText, 0, 0, 200, 0, "Arial", 16 ) helpText:setReferencePoint(display.CenterReferencePoint) helpText:setTextColor(255) helpText.x = display.contentCenterX helpText.y = 50
Everything work fine in the simulator, you can see all the text.
If you try this little example on a device with iOS 7 you will see that the text is cut, sometimes on the first line, sometimes on the second line.
For me, on my iPad Retina with iOS 7, I can see on my screen :
____________________________
The ‘clef’ at the beginning of
the staff determines the
____________________________
It’s a big problem for me because I use a lot this “flexible height” stuff on my app.
Thanks for your help.
Best
Olivier
Hi Olivier,
I tried the exact code you show on my iPad Retina 4th-gen with iOS7, and the text appears as expected… it’s not cut off, and I can read the entire sentence.
I used Corona build #1225
Retina iPad
iOS 7.0.2
config.lua setup at 640x960 “letterbox”
You may consider using non-flexible boxes with a very high height setting (like 2000), put the text inside, and then align them along a top-center point, not a center point. You would need to experiment with this, however, and see how it works in your app.
Best regards,
Brent
Thank you Brent 
I will try with the latest version of Corona build.
I hope It will be ok.
Thanks again
Best regards,
Olivier
Brent, I’v just installed Version 2013.1242 (2013.10.24)
Everything is OK now :lol:
Thanks!
Olivier