– 创建实现换行功能的文本
function LoadLabelHeroIntroduce(objLabelContent)
local tLabel = LG.Label:create()
– 实现换行功能
tLabel:ignoreContentAdaptWithSize(false)
tLabel:setText(objLabelContent)
local tSize = tLabel:getContentSize()
local tmp_width = tSize.width
local end_height = (tmp_width / 180 +1)* (tSize.height)
tLabel:setSize(Global_CCSize(180,end_height))
return tLabel
end
