代码:
cell.textLabel?.lineBreakMode = UILineBreakModeWordWrap
出错:
Use of unresolved identifier ‘UILineBreakModeWordWrap’
搜:
UILineBreakModeWordWrap
参考:
改为:
cell.textLabel?.lineBreakMode = UILineBreakMode.WordWrap
出错:
‘UILineBreakMode’ is unavailable: APIs deprecated as of iOS 7 and earlier are unavailable in Swift
cell.textLabel?.lineBreakMode = NSLineBreakMode.ByWordWrapping
即可。
转载请注明:在路上 » [已解决]Swift代码出错:Use of unresolved identifier UILineBreakModeWordWrap