KAKUSAN 0.5.0

KAKUSAN 0.5.0

Maintained by anzfactory.



KAKUSAN 0.5.0

KAKUSAN

CI Status Version License Platform

ANZSingleImageViewer

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. To install it, simply add the following line to your Podfile:

pod 'KAKUSAN'

Usage

KAKUSAN.shared.start()

Coniguration

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

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.