Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 在核心打印中设置轴文字样式_Ios_Objective C_Uilabel_Core Plot_Cptbarplot - Fatal编程技术网

Ios 在核心打印中设置轴文字样式

Ios 在核心打印中设置轴文字样式,ios,objective-c,uilabel,core-plot,cptbarplot,Ios,Objective C,Uilabel,Core Plot,Cptbarplot,所以我实现了一个带有核心图的条形图,现在我的y轴是这样的 我试图做的是从所有实例中删除尾部的.0,但不确定需要设置什么属性,需要重写什么方法,或者需要子类化什么类来编辑显示样式 非常感谢能够提供帮助的任何人。尝试使用合适的NSNumberFormatter设置labelformatter 例如:- NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init]; [numberFormatter setNumberSt

所以我实现了一个带有核心图的条形图,现在我的y轴是这样的

我试图做的是从所有实例中删除尾部的.0,但不确定需要设置什么属性,需要重写什么方法,或者需要子类化什么类来编辑显示样式


非常感谢能够提供帮助的任何人。

尝试使用合适的
NSNumberFormatter
设置labelformatter

例如:-

NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init];
[numberFormatter setNumberStyle:NSNumberFormatterDecimalStyle];
[numberFormatter setMaximumFractionDigits:0];
[numberFormatter setMinimumFractionDigits:0];
CPTXYAxis *y = axisSet.yAxis;
y.labelFormatter = numberFormatter;

正是我要找的!非常感谢,做得很好