core-plot CPTextStyle fontName只读

mas*_*gar 2 core-plot ios4

我正在玩核心情节,我想为轴标题设置字体系列和大小,所以我做的是:

CPTextStyle *axisTitleTextStyle = [CPTextStyle textStyle];
axisTitleTextStyle.fontName = @"Helvetica Bold";
axisTitleTextStyle.fontSize = 14.0;
Run Code Online (Sandbox Code Playgroud)

但是当我编译时,我得到了错误:

error: object cannot be set - either readonly property or no setter found
Run Code Online (Sandbox Code Playgroud)

我该如何设置字体?

谢谢,马克斯

Eri*_*och 6

CPTextStyle改变了一会儿.它现在是不可改变的.有一个叫做变量的变种CPMutableTextStyle.