最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

[已解决]Swift代码出错:Use of unresolved identifier UILineBreakModeWordWrap

Swift crifan 3777浏览 0评论
代码:
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
UILineBreakMode tip show WordWrap
cell.textLabel?.lineBreakMode = NSLineBreakMode.ByWordWrapping
即可。

转载请注明:在路上 » [已解决]Swift代码出错:Use of unresolved identifier UILineBreakModeWordWrap

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
85 queries in 0.163 seconds, using 22.08MB memory