Skip to content

Commit

Permalink
docs: update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
chrwendt committed Apr 18, 2020
1 parent 4fc00c2 commit 978c0c7
Show file tree
Hide file tree
Showing 10 changed files with 123 additions and 10 deletions.
13 changes: 9 additions & 4 deletions Documentation/Reference/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
# Reference Documentation
This Reference Documentation has been generated with
[SourceDocs](https://github.com/eneko/SourceDocs).

## Protocols

- [SheetyColorProtocol](protocols/SheetyColorProtocol.md)
- [SheetyColorsConfigProtocol](protocols/SheetyColorsConfigProtocol.md)
- [SheetyColorsDelegate](protocols/SheetyColorsDelegate.md)

## Structs

- [SheetyColorsConfig](structs/SheetyColorsConfig.md)
- [SheetyColorsView](structs/SheetyColorsView.md)
- [SheetyColorsViewFactory](structs/SheetyColorsViewFactory.md)

## Classes

- [Coordinator](classes/Coordinator.md)
- [GrayscaleColor](classes/GrayscaleColor.md)
- [HSBAColor](classes/HSBAColor.md)
- [RGBAColor](classes/RGBAColor.md)
- [SheetyColorsViewController](classes/SheetyColorsViewController.md)

## Enums

Expand All @@ -28,3 +29,7 @@ This Reference Documentation has been generated with
- [RGBAColor](extensions/RGBAColor.md)
- [SheetyColorsController](extensions/SheetyColorsController.md)
- [UIColor](extensions/UIColor.md)

# Reference Documentation
This reference documentation was generated with
[SourceDocs](https://github.com/eneko/SourceDocs).
14 changes: 14 additions & 0 deletions Documentation/Reference/classes/Coordinator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
**CLASS**

# `Coordinator`

```swift
public class Coordinator: NSObject, SheetyColorsDelegate
```

## Methods
### `didSelectColor(_:)`

```swift
public func didSelectColor(_ color: UIColor)
```
8 changes: 4 additions & 4 deletions Documentation/Reference/classes/RGBAColor.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ public init(red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat)
> Creates a RGBAColor instance.
>
> - Parameter:
> - red: The red component.
> - green: The green component.
> - blue: The blue component.
> - alpha: The opacity component.
> - red: The red component.
> - green: The green component.
> - blue: The blue component.
> - alpha: The opacity component.

### `copy(with:)`

Expand Down
16 changes: 16 additions & 0 deletions Documentation/Reference/classes/SheetyColorsViewController.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
**CLASS**

# `SheetyColorsViewController`

```swift
public class SheetyColorsViewController: UIViewController, SheetyColorsViewControllerProtocol
```

> The controller class managing a SheetyColors view.

## Methods
### `viewDidLoad()`

```swift
public override func viewDidLoad()
```
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ convenience init(withConfig config: SheetyColorsConfigProtocol)
> Creates a SheetyColorsController instance.
>
> - Parameter:
> - config: A config object containing options for specifying the look and feel of a SheetyColors view.
> - config: A config object containing options for specifying the look and feel of a SheetyColors view.
7 changes: 7 additions & 0 deletions Documentation/Reference/extensions/UIColor.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@ var rgbaColor: RGBAColor
```

> The RGBAColor representation of the UIColor instance.
## Methods
### `init(hex:)`

```swift
public convenience init?(hex: String)
```
2 changes: 1 addition & 1 deletion Documentation/Reference/protocols/SheetyColorProtocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
public protocol SheetyColorProtocol: Codable
```

> A protocol defining a color object provided by the SheetyColors view..
> A protocol defining a color object provided by the SheetyColors view.

## Properties
### `uiColor`
Expand Down
21 changes: 21 additions & 0 deletions Documentation/Reference/protocols/SheetyColorsDelegate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
**PROTOCOL**

# `SheetyColorsDelegate`

```swift
public protocol SheetyColorsDelegate: AnyObject
```

> A protocol defining functions that are called when interacting with a color picker.

## Methods
### `didSelectColor(_:)`

```swift
func didSelectColor(_ color: UIColor)
```

> A delegate function that gets called once any slider value has been changed.
>
> - Parameter:
> - color: The updated color.
26 changes: 26 additions & 0 deletions Documentation/Reference/structs/SheetyColorsView.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
**STRUCT**

# `SheetyColorsView`

```swift
public struct SheetyColorsView: UIViewControllerRepresentable
```

## Methods
### `makeCoordinator()`

```swift
public func makeCoordinator() -> Coordinator
```

### `makeUIViewController(context:)`

```swift
public func makeUIViewController(context: UIViewControllerRepresentableContext<SheetyColorsView>) -> SheetyColorsViewController
```

### `updateUIViewController(_:context:)`

```swift
public func updateUIViewController(_: SheetyColorsViewController, context _: UIViewControllerRepresentableContext<SheetyColorsView>)
```
24 changes: 24 additions & 0 deletions Documentation/Reference/structs/SheetyColorsViewFactory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
**STRUCT**

# `SheetyColorsViewFactory`

```swift
public struct SheetyColorsViewFactory
```

> A factory for creating SheetyColors view controller

## Methods
### `createView(withConfig:delegate:)`

```swift
public static func createView(withConfig config: SheetyColorsConfigProtocol, delegate: SheetyColorsDelegate? = nil) -> SheetyColorsViewController
```

> Creates a SheetyColorsViewController instance based on a given configuration.
>
> - Parameter:
> - config: Defines all aspects of the view such as a color model type, alpha value support, texts, initial colors, or haptical feedback.
> - delegate: A delegate used for handling the color selection. A delegate needs to be provided in cases where you want to use the SheetyColorsViewController directly and not as part of a UIAlertViewController (e.g. SwiftUI).
>
> - Returns: A SheetyColorsViewController instance.

0 comments on commit 978c0c7

Please sign in to comment.