2011-06-24 19 views
0

我米從SQLite表中檢索數據並在填充的tableview它如何從數組插入數據到uitableview?

//get notes saved to database 
    NSString *[email protected]"select * from ATTACHABLEITEM where ATYPE='notes'"; 
    NSArray *notesarray=[delegate.database executeQuery:selectQuery]; 

    [table dictionaryWithValuesForKeys:notesarray]; 

this is going wrong.what is the right way to do so? 
+0

假設notesarray爲您提供字典數組,[dictionaryWithValuesForKeys]返回根據爲指定鍵獲取的值構建的字典。 – Devang

回答

1

表視圖是iOS開發的主食。你應該花時間學習如何使用它們。

你會發現下面的資源幫助:

本質上講,你創建一個表視圖,並設置委託和數據源對象這對某些方法有反應。這些方法適用於表視圖的配置和內容。對於在給定索引處顯示什麼數據,「諮詢」日期來源。