Chenhui Zhang

Results 4 comments of Chenhui Zhang

你那个ValueForKey的key._去掉就不崩溃.有_就崩溃...我刚也试了试

> [self setValue:@“xxx”forKey:@“_ cancelButtonText”]; > 这个有什么新方法替代吗? 去掉下划线,亲测没问题 searchBar.setValue("呵呵哒", forKey: "cancelButtonText")

我瞅了瞅源码.是以下方法创建的点上的文字 ``` - (CATextLayer *)createPointLabelFor:(CGFloat)grade pointCenter:(CGPoint)pointCenter width:(CGFloat)width withChartData:(PNLineChartData *)chartData ``` 然后作者使用了一个局部可变数组变量"gradePathArray"去存储实例化的CATextLayer.我们可以弄一个NSArray去记录一下这些layer.这些CATextLayer的实例化在如下方法中 ``` - (void)calculateChartPath:(NSMutableArray *)chartPath andPointsPath:(NSMutableArray *)pointsPath andPathKeyPoints:(NSMutableArray *)pathPoints andPathStartEndPoints:(NSMutableArray *)pointsOfPath { } ``` self.xxarray = gradePathArray.copy; 然后在调用stokeChart和updateChartData的时候便利一下这个数组.将其中存储的CATextLayer实例化对象removeFromSuperLayer.这样调用这俩方法的时候就会刷新了. 另,这个文字底部的白色默认颜色的问题可以搜索 ```...