Skip to content

Commit dceb157

Browse files
committed
Updated Readme and docs.
1 parent 1cdfeda commit dceb157

File tree

4 files changed

+22
-9
lines changed

4 files changed

+22
-9
lines changed

Assets/Readme/spm-install-preview.png

20.2 KB
Loading

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,14 @@ Ready for use on iOS 11+. Works with Swift 5+. Required Xcode 12.0 and higher.
6060

6161
### Swift Package Manager
6262

63-
The [Swift Package Manager](https://swift.org/package-manager/) is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.
63+
The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.
6464

65-
To integrate using Xcode 12, specify it in `File > Swift Packages > Add Package Dependency...`:
65+
Once you have your Swift package set up, adding as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.
6666

67-
```ogdl
68-
https://github.com/ivanvorobei/SPAlert
67+
```swift
68+
dependencies: [
69+
.package(url: "https://github.com/ivanvorobei/SPAlert", .upToNextMajor(from: "3.5.0"))
70+
]
6971
```
7072

7173
### CocoaPods:
@@ -112,7 +114,13 @@ alertView.duration = 4
112114
alertView.present()
113115
```
114116

115-
If you don't want to dimiss alert in time, set `dismissInTime` to `false`. After it `duration` property will be ignored.
117+
If you don't want to dimiss alert in time, disable `dismissInTime`. After it `duration` property will be ignored.
118+
119+
```swift
120+
alertView.dismissInTime = false
121+
```
122+
123+
In this case you shoud dismiss alert manually.
116124

117125
### Layout
118126

Sources/SPAlert/SPAlertView.swift

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,24 @@ import UIKit
3636
@available(iOSApplicationExtension, unavailable)
3737
open class SPAlertView: UIView {
3838

39-
// MARK: - Properties
40-
41-
open var dismissByTap: Bool = true
4239
open var completion: (() -> Void)? = nil
4340

44-
// MARK: - UIAppearance
41+
// MARK: - Properties
4542

43+
/**
44+
SPAlert: Wrapper of corner radius of alert.
45+
*/
4646
@objc dynamic open var cornerRadius: CGFloat = 8 {
4747
didSet {
4848
layer.cornerRadius = self.cornerRadius
4949
}
5050
}
5151

52+
/**
53+
SPAlert: Dismiss alert by tap in any place inside. By default is on.
54+
*/
55+
@objc dynamic open var dismissByTap: Bool = true
56+
5257
/**
5358
SPAlert: Automatically dismiss in time or not. Duration of dismiss can be changed by property `duration`.
5459
*/

0 commit comments

Comments
 (0)