-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
123 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
Documentation/Reference/classes/SheetyColorsViewController.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
24
Documentation/Reference/structs/SheetyColorsViewFactory.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |