https://github.com/anzfactory/kakusan
Automatically detect when a user takes a screenshot, and share that screenshot.
https://github.com/anzfactory/kakusan
cocoapods screenshot share swift4
Last synced: 6 days ago
JSON representation
Automatically detect when a user takes a screenshot, and share that screenshot.
- Host: GitHub
- URL: https://github.com/anzfactory/kakusan
- Owner: anzfactory
- License: mit
- Created: 2019-02-25T11:19:49.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-12T12:17:37.000Z (almost 6 years ago)
- Last Synced: 2025-02-02T15:51:38.145Z (19 days ago)
- Topics: cocoapods, screenshot, share, swift4
- Language: Swift
- Size: 3.97 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KAKUSAN
[](https://travis-ci.org/anzfactory/KAKUSAN)
[](https://cocoapods.org/pods/KAKUSAN)
[](https://cocoapods.org/pods/KAKUSAN)
[](https://cocoapods.org/pods/KAKUSAN)
Automatically detect when a user takes a screenshot, and share that screenshot.
(with "UIActivityViewController")## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
- Xcode v10.1
- Swift v4.2
- iOS v10.0+## Installation
KAKUSAN is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'KAKUSAN'
```## Usage
```swift
KAKUSAN.shared.start()
```### Coniguration
```swift
var config = KAKUSAN.Config(text: "Share Text", url: URL(string: "https://example.com/"))
config.alert.title = "Share!"
config.alert.message = "Would you like to share screenshot?"
config.alert.style = .actionSheet
config.alert.delay = 2.0
config.alert.action.positiveText = "Done"
config.alert.action.negativeText = "Cancel"
config.watermark = KAKUSAN.Watermark(
image: UIImage(named: "watermark")!,
alpha: 0.4,
position: .bottomRight(padding: 16.0)
)
KAKUSAN.shared.configure(config)
```### Customize confirmation dialog
```swift
KAKUSAN.shared.confirmationDelegate = self// ConfirmationDelegate
extension ViewController: KAKUSANConfirmationDelegate {
func kakusanConfirmation(screenshot: UIImage, handler: @escaping KAKUSANHandler) {
// show custom dialog
}
}
```## Author
anzfactory, [email protected]
## License
KAKUSAN is available under the MIT license. See the LICENSE file for more info.