Swift: expected declaration error setting “Label” to a string variable

前端 未结 1 772
鱼传尺愫
鱼传尺愫 2020-12-19 04:32

I am managing different languages, in a small single pane app, using a different string array for each comment, indexed by an integer variable \"userLang\", then setting lab

相关标签:
1条回答
  • 2020-12-19 05:22
    msgArrayOne.text = arrayOne[userLang]  
    msgArrayTwo.text = arrayTwo[userLang]
    

    These are not declarations, you will need to move them to viewDidLoad() or some other appropriate place. Your syntax for labels is fine, but you have the code in the wrong place in the class.

    0 讨论(0)
提交回复
热议问题