Skip to content

Commit 436774d

Browse files
committed
Added a method to remove all background limit bands from an axis.
1 parent 2751f48 commit 436774d

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

framework/Source/CPTAxis.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ typedef NS_ENUM (NSInteger, CPTAxisLabelingPolicy) {
300300
/// @{
301301
-(void)addBackgroundLimitBand:(CPTLimitBand *)limitBand;
302302
-(void)removeBackgroundLimitBand:(CPTLimitBand *)limitBand;
303+
-(void)removeAllBackgroundLimitBands;
303304
/// @}
304305

305306
@end

framework/Source/CPTAxis.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1865,6 +1865,16 @@ -(void)removeBackgroundLimitBand:(CPTLimitBand *)limitBand
18651865
}
18661866
}
18671867

1868+
/** @brief Remove all background limit bands.
1869+
**/
1870+
-(void)removeAllBackgroundLimitBands
1871+
{
1872+
[self.mutableBackgroundLimitBands removeAllObjects];
1873+
1874+
CPTPlotArea *thePlotArea = self.plotArea;
1875+
[thePlotArea setNeedsDisplay];
1876+
}
1877+
18681878
#pragma mark -
18691879
#pragma mark Responder Chain and User interaction
18701880

0 commit comments

Comments
 (0)