ibh

IBHeatMap

A simple HeatMap Implementation for iOS

Showing:

Popularity

Downloads/wk

0

GitHub Stars

79

Maintenance

Last Commit

7yrs ago

Contributors

1

Package

Dependencies

0

License

MIT

Categories

Readme

IBHeatMap

sample

Purpose

IBHeatMap is a simple to use (although a bit slow) HeatMap generator for iOS. All it is required are points, radius and colors and it will generate a HeatMap on top of your desired content.

Properties

The IBHEatMap has the following properties:

@property (nonatomic, strong) id<IBHeatMapDelegate> delegate;

An array that contains the colors in order of ascending order.

@property (nonatomic, strong) NSArray *colors;

An array that contains all the points with relative values ranging from 0 to 1 (in both XX and YY axis as CGPoints in NSValues).

@property (nonatomic, strong) NSArray *points;

And finally a CGFloat value for the point radius of impact.

@property (nonatomic, assign) CGFloat pointRadius;

Delegate

Delegate implements a method to be notified when the heatmap finishes being generated. This should help users provide loaders for when it is being generated.

- (void)heatMapFinishedLoading;

Example

The view should be generated by code or by XIB.

self.heatMap = [[IBHeatMap alloc]initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), CGRectGetHeight(self.view.bounds)) points:locations colors:@[[UIColor greenColor], [UIColor yellowColor], [UIColor redColor]] pointRadius:40.0f];

You can assign a delegate to know when the map finishes being generated.

self.heatMap.delegate = self;

And by implementing the following function

-(void)heatMapFinishedLoading {
  NSLog(@"FinishedLoadingHeatMap"); 
}

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100