cptbarplot

Cell of UICollectionView not always refreshed after a scroll

一曲冷凌霜 提交于 2020-01-12 06:51:30
问题 I have defined in my Storyboard (iPad) a view that contains a UICollectionView , at the bottom of the view there's also a UIToolbar . In the UICollectionView I have added a UICollectionViewCell (implemented by an iPadCellCollectionViewCell class) that contains a another view that is a Core-Plot Graph (a CPTGraphHostingView class). I have a class called X that implements the UICollectionViewDelegate and UICollectionViewDataSource . In the class X, I build for each cell of my view (in

Positioning label on CPTBarPlot (Core-Plot)

旧街凉风 提交于 2019-12-07 08:21:57
问题 I am trying to change default position of labels in Bar chart with Core-Plot. I am using this method: -(CPTLayer *)dataLabelForPlot:(CPTPlot *)plot recordIndex:(NSUInteger)idx; And I return: return textLayer = [[CPTTextLayer alloc] initWithText:@"2222" style:textStyle]; I get this result: But I want to appear as follows: Any idea? I tried to find answer on documentation, but I has been impossible. 回答1: Use a negative labelOffset for the bar plot. The default is +10 which puts the labels 10

Positioning label on CPTBarPlot (Core-Plot)

六月ゝ 毕业季﹏ 提交于 2019-12-05 12:11:29
I am trying to change default position of labels in Bar chart with Core-Plot. I am using this method: -(CPTLayer *)dataLabelForPlot:(CPTPlot *)plot recordIndex:(NSUInteger)idx; And I return: return textLayer = [[CPTTextLayer alloc] initWithText:@"2222" style:textStyle]; I get this result: But I want to appear as follows: Any idea? I tried to find answer on documentation, but I has been impossible. Use a negative labelOffset for the bar plot. The default is +10 which puts the labels 10 pixels above the bars. This property is inherited from CPTPlot so it works for all plot types, although the

Cell of UICollectionView not always refreshed after a scroll

允我心安 提交于 2019-12-03 11:51:57
I have defined in my Storyboard (iPad) a view that contains a UICollectionView , at the bottom of the view there's also a UIToolbar . In the UICollectionView I have added a UICollectionViewCell (implemented by an iPadCellCollectionViewCell class) that contains a another view that is a Core-Plot Graph (a CPTGraphHostingView class). I have a class called X that implements the UICollectionViewDelegate and UICollectionViewDataSource . In the class X, I build for each cell of my view (in ViewDidLoad ) the Core-Plot Graph and I have the following code to link the graph to the cell of the