Skip to content

Commit

Permalink
chore: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gtokman committed Apr 25, 2021
1 parent 0bdd0b2 commit 2aa4424
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Documentation/Reference/ExtensionKit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
- [dprint(__)](methods/dprint(__).md)
- [sleep(duration_)](methods/sleep(duration_).md)

This file was generated by [SourceDocs](https://github.com/eneko/SourceDocs) on 2021-04-24 19:31:50 +0000
This file was generated by [SourceDocs](https://github.com/eneko/SourceDocs) on 2021-04-25 05:38:11 +0000
2 changes: 1 addition & 1 deletion Documentation/Reference/ExtensionKit/extensions/Timer.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ class func schedule(repeatInterval interval: TimeInterval, handler: @escaping ()
Schedule closure to run on main run loop and repeat at the interval

- Parameters:
- interval: 触发时长从现在开始经过interval时长后触发第一次
- interval: Interval
- handler: Closure to run
- Returns: CFRunLoopTimer
66 changes: 65 additions & 1 deletion Documentation/Reference/ExtensionKit/extensions/View.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,24 @@ Fill parent view
| ---- | ----------- |
| alignment | alignment |

### `fillWidth()`

```swift
func fillWidth() -> some View
```

Fill parent's width
- Returns: view

### `fillHeight()`

```swift
func fillHeight() -> some View
```

Fill parent's height
- Returns: view

### `if(_:transform:)`

```swift
Expand Down Expand Up @@ -126,4 +144,50 @@ Hides the view conditionally

| Name | Description |
| ---- | ----------- |
| hidden | is hidden |
| hidden | is hidden |

### `shimmer(isActive:speed:angle:)`

```swift
func shimmer(
isActive: Bool = true,
speed: Double = 0.15,
angle: Angle = .init(degrees: 70)
) -> some View
```

Loading shimmer animation on view
- Parameters:
- isActive: is shimmer animation active
- speed: speed, default: 0.15
- angle: angle of animation, default: 70º
- Returns: View

#### Parameters

| Name | Description |
| ---- | ----------- |
| isActive | is shimmer animation active |
| speed | speed, default: 0.15 |
| angle | angle of animation, default: 70º |

### `addBorder(_:width:cornerRadius:)`

```swift
func addBorder<S>(_ content: S, width: CGFloat = 1, cornerRadius: CGFloat) -> some View where S: ShapeStyle
```

Overlay border on view
- Parameters:
- content: ShapeStyle view
- width: border width
- cornerRadius: corner radius
- Returns: view

#### Parameters

| Name | Description |
| ---- | ----------- |
| content | ShapeStyle view |
| width | border width |
| cornerRadius | corner radius |
1 change: 1 addition & 0 deletions Sources/ExtensionKit/SwiftUI/Color.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import SwiftUI

#endif

@available(iOS 13.0, macOS 10.15, *)
public extension Color {

/// Initialize with HEX
Expand Down
1 change: 1 addition & 0 deletions Sources/ExtensionKit/SwiftUI/RoundedCorner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import SwiftUI

#endif

@available(iOS 13.0, macOS 10.15, *)
struct RoundedCorner: Shape {
var radius: CGFloat = .infinity
var corners: UIRectCorner = .allCorners
Expand Down
1 change: 1 addition & 0 deletions Sources/ExtensionKit/SwiftUI/ShimmerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import SwiftUI
#endif

/// View with linear gradient shimmer animation
@available(iOS 13.0, macOS 10.15, *)
struct ShimmerView: View {
@State var show: Bool = false

Expand Down
2 changes: 1 addition & 1 deletion Sources/ExtensionKit/SwiftUI/View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import SwiftUI

#endif

@available(iOS 13.0, *)
@available(iOS 13.0, macOS 10.15, *)
public extension View {

/// Fill parent view
Expand Down

0 comments on commit 2aa4424

Please sign in to comment.