2011-04-27 99 views
0

我仍然很新的目標C,事實上這是我第一次來構建應用程序的嘗試,所以請多多包涵......核心情節加入UITable

我想補充核心 - 旁邊有一個UITable情節圖,我採取了CPTestApp的例子,並聲明工作,我能夠得到圖部分工作正常,但我遇到了與UITable的麻煩。下面是它如何看待moment.UITable截圖倒置和文本的所有鏡像.. enter image description here

下面

是旋轉部分,可有人點我與UITable旋轉與圖形一起的例子.. .UITable會填充值的數組和太工作確定..

我可能需要一些指導,以找出正確的方式UItable添加到coreplothosting視圖層

感謝

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation 
{ 
if (UIInterfaceOrientationIsLandscape(fromInterfaceOrientation)) 
{ 
    // Move the plots into place for portrait 
    scatterPlotView.frame = CGRectMake(20.0f, 55.0f, 728.0f, 556.0f); 
    tblSimpleTable.frame = CGRectMake(20.0f, 644.0f, 728.0f, 340.0f); 

    [tblSimpleTable reloadData]; 
} 
else 
{ 
    // Move the plots into place for landscape 
    scatterPlotView.frame = CGRectMake(20.0f, 55.0f, 858.0f, 677.0f); 
    tblSimpleTable.frame = CGRectMake(878.0f, 51.0f, 220.0f, 677.0f); 

    [tblSimpleTable reloadData]; 

} 
} 

回答

0

核心繪圖對所有核心動畫層應用翻轉變換,以便繪圖代碼可以在iOS和MacOS之間共享。這就是你所看到的。

請確保您的UITable和圖表託管視圖是兄弟(即,有一個共同的父視圖),並且一個不是另一個的子視圖。

+0

你可以請我指點一下這種補充的例子嗎? Tks – Linus 2011-04-27 22:56:00

+0

CPTestApp的iPad版本(位於Core Plot示例文件夾中)執行此操作。 – 2011-04-27 23:09:55

+0

謝謝它的作品..! – Linus 2011-04-28 03:19:27