2011-07-11 100 views
0

我有我設置爲甲級子視圖廈門國際銀行:S7GraphView(如果我選擇它,然後單擊身份檢查)如何將s7graphview添加到ViewController nib的子視圖上?

當所有我在(無效)didViewLoad {...

s7graphView = [[S7GraphView alloc] initWithFrame:[self.view bounds]]; 
    //[self.view addSubview:s7graphView]; 
    s7graphView.dataSource = self; 
    ... 
} 

在筆尖中,我控制 - 將文件的所有者控制在子視圖中,並選擇- S7GraphView,並且仍然在模擬器中顯示爲空

如果我評論這一切的時候,我得到一個黑色的子視圖(我將背景設置爲黑色),而不是圖:

// s7graphView = [[S7GraphView alloc] initWithFrame:[self.view bounds]]; 
// //[self.view addSubview:s7graphView]; 
// s7graphView.dataSource = self; 
// [s7graphView release]; 

如果我刪除從我的觀點的子視圖,而是將其添加程序,它的工作原理,當我加入這樣的:

s7graphView = [[S7GraphView alloc] initWithFrame:CGRectMake(20., 70., 280.0, 240.0)]; 
[self.view addSubview:s7graphView]; 
s7graphView.dataSource = self; [s7graphView release]; 

我應該可以通過廈門國際銀行將其添加太多了吧?你認爲我做錯了什麼?

謝謝!

回答

0

您是否實現了委託和數據源?

相關問題