2012-09-07 22 views
1

我正在使用coreplot 0.9。我嘗試過爲CPTLineStyle設置linecolor屬性如何使用coreplot爲折線圖設置textstyle?

但它給出的錯誤是color或fontSize是隻讀屬性。請給我一些解決方案。

static CPTTextStyle *labelTextStyle= nil ; 
    labelTextStyle = [[CPTTextStyle alloc]init]; 
    labelTextStyle.color =[CPTColor whiteColor]; 
    labelTextStyle.fontSize = 10.0f ; 

回答

1

使用CPTMutableTextStyle。在Core Plot中,文本樣式,線條樣式,陰影和數字數據對象有兩種變體 - 可變和不可變。這遵循許多可可物體共有的模式,如NSStringNSArray

相關問題