<commit_before># ESArcProgressView
[![Platform](https://cocoapod-badges.herokuapp.com/p/ESArcProgressView/badge.png)](http://cocoadocs.org/docsets/ESArcProgressView)
[![Version](https://cocoapod-badges.herokuapp.com/v/ESArcProgressView/badge.png)](http://cocoadocs.org/docsets/ESArcProgressView)

A progress view to be used within Apple Watch projects

## Examples
![](https://raw.githubusercontent.com/e-sites/ESArcProgressView/master/Assets/example1.png)


## Installation

### Cocoapods
```pod 'ESArcProgressView', '~> 1.0'```

### Manually

These classes have the following dependecies:
- `QuartzCore` Framework

## Usage

### ESMultipleArcProgressView
```#import <ESMultipleArcProgressView.h>```

```objc
ESMultipleArcProgressView *v = [[ESMultipleArcProgressView alloc] initWithFrame:CGRectMake(40, 40, 200, 200)];
[self.view addSubview:v];
    
ESArcProgressView *pv = [[ESArcProgressView alloc] init];
[pv setProgress:0.5];
[pv setColor:[UIColor orangeColor]];
[v addArcProgressView:pv];
    
pv = [[ESArcProgressView alloc] init];
[pv setProgress:0.65];
[pv setColor:[UIColor greenColor]];
[v addArcProgressView:pv];
    
pv = [[ESArcProgressView alloc] init];
[pv setProgress:0.8];
[pv setColor:[UIColor redColor]];
[v addArcProgressView:pv];
```

```objc
// To extract the UIImage:
UIImage *image = [v generateImage];
```

### ESArcProgressView
```#import <ESArcProgressView.h>```

```objc
ESArcProgressView *pv = [[ESArcProgressView alloc] initWithFrame:CGRectMake(20, 20, 200, 200)];
[pv setProgress:0.5];
[pv setColor:[UIColor orangeColor]];
[self.view addSubview:pv];
```

```objc
// To extract the UIImage:
UIImage *image = [pv generateImage];
```

## ESArcProgressView

### Properties

| Property 	| Type  | Description  | Default value
|-------	|------ |----------    | -------
| `color`		| UIColor | The color of the line | Green     
| `backgroundColor`	| UIColor | The background color of the line | Default = 50% transparent of color
| `dotColor	`	| UIColor | The color of the center dot at the beginning / end of the line | White    
| `lineWidth`		| CGFloat | The line width (aka diameter) of the line | 20       
| `showShadow`	| BOOL | Should the line have a drop shadow | YES
| `centerDotStyle`	| ESArcProgress-CenterDotStyle | Center dot style placement | ESArcProgress-CenterDotStyle-BeginAndEnd

### ESArcProgressCenterDotStyle
```objc
typedef NS_ENUM(NSInteger, ESArcProgressCenterDotStyle) {
    ESArcProgressCenterDotStyleNone = 0,
    ESArcProgressCenterDotStyleBegin,
    ESArcProgressCenterDotStyleEnd,
    ESArcProgressCenterDotStyleBeginAndEnd
};
```

## ESMultipleArcProgressView

### Properties

| Property 	| Type  | Description  | Default value
|-------	|------ |----------    | -------
| `margin`		| CGFloat | The space between the progress views | 1.0


### Methods

------------

#### `addArcProgressView:`

Adds a `ESArcProgressView` to the view. Each `ESArcProgressView` will be inserted inside the previous `ESArcProgressView`.

| Parameter 	| Type  | Description
|-------	|------ |----------
| `progressView`		| ESArcProgressView | The ESArcProgressView to add

------------

#### `removeArcProgressView:`

Remove a particual `ESArcProgressView` from the view stack. This method will reposition the remaining progress views accordingly.

| Parameter 	| Type  | Description
|-------	|------ |----------
| `progressView`		| ESArcProgressView | The ESArcProgressView to be removed<commit_msg>Improved readme<commit_after># ESArcProgressView
[![Platform](https://cocoapod-badges.herokuapp.com/p/ESArcProgressView/badge.png)](http://cocoadocs.org/docsets/ESArcProgressView)
[![Version](https://cocoapod-badges.herokuapp.com/v/ESArcProgressView/badge.png)](http://cocoadocs.org/docsets/ESArcProgressView)

A progress view to be used within Apple Watch projects

## Examples
![](https://raw.githubusercontent.com/e-sites/ESArcProgressView/master/Assets/example1.png)


## Installation

### Cocoapods
```pod 'ESArcProgressView', '~> 1.0'```

### Manually

These classes have the following dependecies:
- `QuartzCore` Framework

## Usage

### ESMultipleArcProgressView
```#import <ESMultipleArcProgressView.h>```

```objc
ESMultipleArcProgressView *v = [[ESMultipleArcProgressView alloc] initWithFrame:CGRectMake(40, 40, 200, 200)];
[self.view addSubview:v];
    
ESArcProgressView *pv = [[ESArcProgressView alloc] init];
[pv setProgress:0.5];
[pv setColor:[UIColor orangeColor]];
[v addArcProgressView:pv];
    
pv = [[ESArcProgressView alloc] init];
[pv setProgress:0.65];
[pv setColor:[UIColor greenColor]];
[v addArcProgressView:pv];
    
pv = [[ESArcProgressView alloc] init];
[pv setProgress:0.8];
[pv setColor:[UIColor redColor]];
[v addArcProgressView:pv];
```

```objc
// To extract the UIImage:
UIImage *image = [v generateImage];
```

### ESArcProgressView
```#import <ESArcProgressView.h>```

```objc
ESArcProgressView *pv = [[ESArcProgressView alloc] initWithFrame:CGRectMake(20, 20, 200, 200)];
[pv setProgress:0.5];
[pv setColor:[UIColor orangeColor]];
[self.view addSubview:pv];
```

```objc
// To extract the UIImage:
UIImage *image = [pv generateImage];
```

## ESArcProgressView

### Properties

| Property 	| Type  | Description  | Default value
|-------	|------ |----------    | -------
| `color`		| UIColor | The color of the line | Green     
| `backgroundColor`	| UIColor | The background color of the line | Default = 50% transparent of color
| `dotColor	`	| UIColor | The color of the center dot at the beginning / end of the line | White    
| `lineWidth`		| CGFloat | The line width (aka diameter) of the line | 20       
| `showShadow`	| BOOL | Should the line have a drop shadow | YES
| `centerDotStyle`	| ESArcProgress-CenterDotStyle | Center dot style placement | ESArcProgress-CenterDotStyle-BeginAndEnd
| `progress`		| CGFloat | The progress in percentage (from 0.0 - 1.0) | 0.0
| `multipleArcProgressView` | ESMultipleArc-ProgressView | The group view this instance belongs to  | nil

### ESArcProgressCenterDotStyle
```objc
typedef NS_ENUM(NSInteger, ESArcProgressCenterDotStyle) {
    ESArcProgressCenterDotStyleNone = 0,
    ESArcProgressCenterDotStyleBegin,
    ESArcProgressCenterDotStyleEnd,
    ESArcProgressCenterDotStyleBeginAndEnd
};
```

### Methods

------------

#### `generateImage`
This method generates (and returns) a `UIImage` which is a snapshot of the current instance's view

## ESMultipleArcProgressView

### Properties

| Property 	| Type  | Description  | Default value
|-------	|------ |----------    | -------
| `margin`		| CGFloat | The space between the progress views | 1.0


### Methods

------------

#### `addArcProgressView:`

Adds a `ESArcProgressView` to the view. Each `ESArcProgressView` will be inserted inside the previous `ESArcProgressView`.

| Parameter 	| Type  | Description
|-------	|------ |----------
| `progressView`		| ESArcProgressView | The ESArcProgressView to add

------------

#### `removeArcProgressView:`

Remove a particual `ESArcProgressView` from the view stack. This method will reposition the remaining progress views accordingly.

| Parameter 	| Type  | Description
|-------	|------ |----------
| `progressView`		| ESArcProgressView | The ESArcProgressView to be removed

-----------

#### `generateImage`
This method generates (and returns) a `UIImage` which is a snapshot of the current instance's view
{'fraction_non_alphanumeric': 0.1603105420866249, 'fraction_numerical': 0.011441024244075185, 'mean_word_length': 4.142156862745098, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1577582', 'n_tokens_mistral': 2417, 'n_tokens_neox': 2277, 'n_words': 591}