From 5fd59e5bf7ec886dcba9978d2043d8880d062009 Mon Sep 17 00:00:00 2001 From: Jille van der Weerd Date: Wed, 11 Mar 2020 09:46:17 +0100 Subject: [PATCH] fixes mistakes in the Readme.md file --- Readme.md | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/Readme.md b/Readme.md index cb99562..7a045cc 100644 --- a/Readme.md +++ b/Readme.md @@ -1,6 +1,6 @@ # SPAlert -**Popup from Apple Music & Feedback in AppStore**. Contains `Done`, `Heart`, `Error` and other presets. Support Dark Mode. I clone Apple's alerts as much as possible. You can find this alerts in AppStore after feedback and after added song to library in Apple Music. +**Popup from Apple Music & Feedback in AppStore**. Contains `Done`, `Heart`, `Error` and other presets. Supports Dark Mode. I tried to recreate Apple's alerts as much as possible. You can find these alerts in the AppStore after feedback and after you add a song to your library in Apple Music.

@@ -8,7 +8,7 @@

-And other +And more:

@@ -34,9 +34,9 @@ And other

-If you like the project, do not forget to `put star ★` and follow me on GitHub. To help project, see [Сooperation](#сooperation) section. +If you like the project, please do not forget to `star ★` this repository and follow me on GitHub. To help out with the project, see the [Сooperation](#сooperation) section. -Check example usage in app _Debts - Spending tracker_ for [iOS](https://itunes.apple.com/app/id1446635818) and [macOS](https://apps.apple.com/app/id1496914334). You can buy source code this apps in my store for iOS developers: +For an example of this plugin in use, check this app: _Debts - Spending tracker_ for [iOS](https://itunes.apple.com/app/id1446635818) and [macOS](https://apps.apple.com/app/id1496914334). You can buy source code this apps in my store for iOS developers: [![xcode-shop.com](https://github.com/ivanvorobei/SPPermissions/blob/master/Assets/Buttons/xcode-shop.svg)](https://xcode-shop.com) [![https://github.com/ivanvorobei](https://github.com/ivanvorobei/SPPermissions/blob/master/Assets/Buttons/follow-me-on-github.svg)](https://github.com/ivanvorobei) @@ -98,31 +98,31 @@ If you prefer not to use any of dependency managers, you can integrate `SPAlert` ## Quick Start -For best experience, I recommend call alerts by `SPAlert`. These functions are updated regularly and show as Apple way. I focus on presets: +For best experience, I recommend presenting the alerts by calling the class functions on `SPAlert`. These functions are updated regularly and show the alerts "the Apple way". I focus on presets: ```swift SPAlert.present(title: "Added to Library", preset: .done) ``` -If you want use custom image, use func: +For using a custom image: ```swift SPAlert.present(title: "Love", message: "We'll recommend more like this in For You", image: UIImage(named: "Heart")!) ``` -For show simple text message, use: +For showing a simple text message: ```swift -SPAlert.present(message: "Empty UITextField") +SPAlert.present(message: "Text!") ``` ## Usage -Sometimes it may require deep customization. In this section, I will show you what you can do. +If you require deep customization, this section will show you what you can do. ### Duration -To change the time that the `SPAlert` will be shown, use property `duration`: +If you want the `SPAlert` to be shwon longer, use the `duration` property: ```swift let alertView = SPAlertView(title: "Added to Library", message: nil, preset: SPAlertPreset.done) @@ -134,9 +134,9 @@ alertView.present() -Dark Mode no need additional configuration. As soon as the user change the interface to dark, all alerts will appear dark. +Dark Mode needs no additional configuration. As soon as the user changes their interface to dark, all alerts will follow suit. -For check state of user appearance I am use `traitCollection`: +This is achieved by checking the `userInterfaceStyle` property on `traitCollection`.: ```swift if self.traitCollection.userInterfaceStyle == .dark { @@ -144,22 +144,22 @@ if self.traitCollection.userInterfaceStyle == .dark { } ``` -It available since iOS 12, for early using always Light Mode. +It is available since iOS 12, for earlier iOS versions the alerts will always be shown in Light Mode. ### Layout -Here you can change the sizes and spaces: +To change the size and spacing of the alerts: ```swift alertView.layout.topSpace = 18 alertView.layout.iconHeight = 25 ``` -For more properties see class. +For more properties see the class. ### Dismiss by Tap -If you click on the alert, it will disappear ahead of time. This can be disabled: +If you tap the alert, it will disappear ahead of time. This can be disabled: ```swift alertView.dismissByTap = false @@ -167,17 +167,17 @@ alertView.dismissByTap = false ### Haptic -If you use presets, the vibro-response will be start automatically. For customize this, you need set property `haptic`: +If you use presets, the vibro-response will be started automatically. To customize this, you need set the `haptic` property: ```swift alertView.haptic = .success ``` -For disable haptic, set it to `.none`. +To disable haptics, set it to `.none`. ### Corner Radius -I use a corner radius like an Apple. If you need to change it, see the property `cornerRadius`: +You can change the corner radius by setting the `cornerRadius` property: ```swift alertView.layer.cornerRadius = 40 @@ -185,10 +185,9 @@ alertView.layer.cornerRadius = 40 ## Сooperation -The development of this project is completely free. If you can make a contribution, it will help development. Here list of task what need do: +This project is free to use, but developing it takes time. Contributing to this project is a huge help. Here is list of tasks that need to be done: -- Fix mistakes in this Readme and docs. My English so bad. Good create pull request. -- Add docs in source files. Description of public methods and parametrs. +- Add documentation in the source files (description of public methods and parameters). - Help me translate my app [Debts - Spending tracker](https://itunes.apple.com/app/id1446635818) for other languages. ## License