TableView不会从外部数据源调用cellForRow

时间:2019-08-07 13:20:35

标签: swift uitableview

我正在尝试使用数据源(不是ViewController,但未调用cellsForRow,而调用rowsInSection的数量)以编程方式设置Tableview

我尝试调用reloadData()却没有任何结果

Sub SetSentFolder()  
 Dim myItem As Outlook.MailITem  
 Dim myResponse As Outlook.MailITem  
 Dim mpfInbox As Outlook.Folder  
 Dim mpf As Outlook.Folder 

 Set mpfInbox = Application.Session.GetDefaultFolder(olFolderInbox)  
 Set mpf = mpfInbox.Folders.Add("SaveMyPersonalItems")  
 Set myItem = Application.ActiveInspector.CurrentItem  
 Set myResponse = myItem.Reply  
 myResponse.Display  
 myResponse.To = "Eugene Astafiev"  
 Set myResponse.SaveSentMessageFolder = mpf  
 myResponse.Send  
End Sub

1 个答案:

答案 0 :(得分:1)

将声明移到函数外,并使其成为类成员。

var tableData: ActivityTableHandler!

这是因为dataSource是一个弱属性,一旦函数范围(在这种情况下为viewDidLoad)结束,就会被破坏