转换Swift self.navigationItem.title = show.uppercased()

时间:2016-12-01 11:00:55

标签: xcode error-handling swift3

您好我现在有这个代码,但我收到一条错误消息。它说,

类型的值'(UIViewController,Any? - > Void'没有成员'大写'

 // title at the top
    self.navigationItem.title = show.uppercased()
有人可以帮助我。感谢

1 个答案:

答案 0 :(得分:0)

请按以下方式声明show变量:

var show:String = "title"

self.navigationItem.title = show.uppercased()