Latest 0.1.2
Homepage https://github.com/loryhuz/CleanyModal
License MIT
Platforms ios 9.0
Authors



CleanyModal is a good way to use UI-Customised alerts with ease

Features

  • [x] Present some kind of clean alerts (With same API as UIAlertViewController)
  • [x] Add easily Textfields or Custom views as an Alert contains content UIStackView
  • [x] Dismiss modal/alert from interaction gesture
  • [x] Present full-custom components as modal from a container view

Demo

Present highly customizable and clean alert from provided built-in methods:

Use root modal system to present your custom components and use only the navigation/interaction stuff:

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Preview

Present a clean Alert with default style:

let alertConfig = CleanyAlertConfig(
  title: "Hello world",
  message: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas sed massa a magna semper semper a eget justo")
let alert = MyAlertViewController(config: alertConfig)

alert.addAction(title: "OK", style: .default)
alert.addAction(title: "Cancel", style: .cancel)

present(alert, animated: true, completion: nil)

Apply your own style/theme easily :

class MyAlertViewController: CleanyAlertViewController {
  override init(config: CleanyAlertConfig) {
    config.styleSettings[.tintColor] = .yellow
    config.styleSettings[.destructiveColor] = .pink
    super.init(config: config)
  }
}

Need to push customization of your Alerts further ?

Extend styles settings keys :

public extension CleanyAlertConfig.StyleKeys {
  public static let shadowOffset = CleanyAlertConfig.StyleKey<CGSize>("shadowOffset")
}

Then apply these news keys in viewDidLoad() implementation of your custom alert.
If you only want to present a custom component (not an alert) as a modal, inherit directly form CleanyModalViewController

See example project to see all abilities to customize, enjoy !

Requirements

  • iOS 9.0+

Installation

CleanyModal is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'CleanyModal', '~> 0.1.2'

Author

lory huz, [email protected]

License

CleanyModal is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "CleanyModal",
    "version": "0.1.2",
    "summary": "Swift UI Kit to present clean alert/modal",
    "description": "Swift UI Kit to help to present clean and beautiful modal/alert in your iOS apps",
    "homepage": "https://github.com/loryhuz/CleanyModal",
    "screenshots": [
        "https://user-images.githubusercontent.com/3198863/38334725-77f10d24-385c-11e8-9e94-89d653628748.png",
        "https://user-images.githubusercontent.com/3198863/38334726-780677b8-385c-11e8-9d69-ca5950520252.png",
        "https://user-images.githubusercontent.com/3198863/38334727-7820f070-385c-11e8-9aa3-d49bf9262a39.png",
        "https://user-images.githubusercontent.com/3198863/44787753-4c670a00-ab98-11e8-869e-a219c82633c0.jpeg"
    ],
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "loryhuz": "[email protected]"
    },
    "source": {
        "git": "https://github.com/loryhuz/CleanyModal.git",
        "tag": "0.1.2"
    },
    "social_media_url": "https://twitter.com/LoryHuz",
    "platforms": {
        "ios": "9.0"
    },
    "swift_version": "5.0",
    "source_files": "CleanyModal/Classes/**/*"
}

Pin It on Pinterest

Share This