iOS - Unable to set text of UILabel

后端 未结 2 850
日久生厌
日久生厌 2021-02-19 16:45

Ok let me explain the situation, I have two view controller let\'s call them first ans second.

  • FirstViewController inherit from UITableViewController
  • Seco
相关标签:
2条回答
  • 2021-02-19 17:10

    The problem was in the initialization, i was setting the label before the view was loaded. Initialize the label in viewDidLoad solved the problem.

    0 讨论(0)
  • 2021-02-19 17:30

    Elio

    Simple test - set a breakpoint at the line where you set self.fileNameLabel.text. When the app stops there, use the debugger to see if the pointer is null.

    Most likely causes: - The outlet is not linked properly - The file owner is not of the right class, make sure to set it to your DbTransfer class

    H

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