Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5488] [iOS] Label's new line ignored when set programmaticaly

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionNeeds more info
Resolution Date2018-01-03T19:08:24.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterMarian Kucharcik
AssigneeShak Hossain
Created2018-01-03T14:49:52.000+0000
Updated2018-01-03T21:16:59.000+0000

Description

Hi guys, when I create label and set it's text to string with \n, new line is correct. When I create label and set it's text later(via HTTP request and JSON parse), new line \n is ignored(tested on iPhone X, 11.2.1, TiSDK 7.0.1). Please take a look. Thanks

Comments

  1. Hans Knöchel 2018-01-03

    Please add a complete test-case to reproduce this behavior.
  2. Marian Kucharcik 2018-01-03

    Hi Hans, I tested it again and I'm very sorry, the problem was in my backend server which escaped \n to \\n in response. After some tweaks with regexp and string replace is everything working as expected. You can mark this as solved. Thank you

JSON Source