Latest 1.0.8
Homepage https://github.com/KuDji/Hatch
License MIT
Platforms ios 10.0
Dependencies SnapKit

CocoaPods Compatible
Platform
Twitter

Requirements

  • iOS 10.0+
  • Xcode 10.1+
  • Swift 4.2+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Hatch into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'Hatch'

How To

Form a alert with the title, image and button:


var hatch: Hatch!

func presentHatch() {
    let batchViewWidth: CGFloat = 300
    let titleText = "Title Text Example!"
    let textColor = UIColor.black
    let imageExmple = UIImage(named: "Ouroboros")
    let imageClose = UIImage(named: "Close")
    let imageSize = CGSize(width: 50, height: 50)
    let buttonText = "Done"

    let config = HatchConfigurator()
    let batchView = HatchBench(sizeWidth: batchViewWidth)
    let closeView = HatchCloseMark(image: imageClose, size: CGSize(width: 28, height: 28))
    hatch = Hatch(bench: batchView, closeMark: closeView, configuraction: config, onView: self.view)
    let hatchLabel = HatchLabel(text: titleText, color: textColor)
    let hatchImage = HatchUIImageView(image: imageExmple, size: imageSize)
    let hatchButoon = HatchButton(text: buttonText, action: #selector(test))

    hatch.addImage(hatchImage)
    hatch.addLabel(hatchLabel)
    hatch.addButton(hatchButoon)

    hatch.present()
}

@objc func test() {
    print("Success")
}

License

Hatch is released under the MIT license. Check LICENSE.md for details.

Contact

If you need to contact my tweeter

Latest podspec

{
    "name": "Hatch",
    "version": "1.0.8",
    "summary": "Hatch custom alerts.",
    "homepage": "https://github.com/KuDji/Hatch",
    "description": "Modeling rhino style Alerts",
    "license": "MIT",
    "authors": "[email protected]",
    "source": {
        "git": "https://github.com/KuDji/Hatch.git",
        "tag": "1.0.8"
    },
    "platforms": {
        "ios": "10.0"
    },
    "swift_version": "4.2",
    "source_files": "Source/*.swift",
    "dependencies": {
        "SnapKit": []
    }
}

Pin It on Pinterest

Share This