Latest 1.1.1
Homepage https://github.com/z-four/Ronni
License MIT
Platforms ios 8.0
Authors

Ronni

Description

A convenient and easy to use library that will make the task of display messages simple. Message views can be displayed at the top or bottom. There are 4 different types already set up for you: Success, Error, Info, Loading, Toast, also you can create your own messages. Take a look at the Example project to see how to use this library.

Example

RonniRonni

RonniRonni

Usage

Style:
let text = "How are you getting on?"
let style = .success //or error, info, loading, toast
let position = .top //or bottom

Ronni.show(to: navController, text: text, style: style, position: position)

//set up background color
Ronni.show(to: navController, text: text, style: style, backgroundColor: UIColor.blue)
Custom message:
let message = Message()
message.title = "Captain America"
message.description = "Captain America is a fictional character appearing in American comic books"
message.backgroundColor = UIColor(hex: "4460A0")
message.image = UIImage(named: "star")
message.buttonText = "Hide"

Ronni.show(to: navController, message: message)

//disable the default auto-hiding behavior (duration = .forever), slide up from the bottom (position = .bottom)
Ronni.show(to: navController, message: message, style: .success, duration: .forever, position: .bottom)

//custom animation duration
 Ronni.show(to: navController, message: message, style: .success, duration: .automatic, position: .top, animTime: 0.0)
Custom view:
 let customView = UIView(frame: CGRect(x: 0, y: 0, width: self.view.frame.size.width, height: 40))
 customView.backgroundColor = UIColor.red

 Ronni.show(to: navController, view: customView, duration: .forever, position: .top)
Specify one or more event listeners:
 Ronni.events.append() { event in
            switch(event) {
                case .willShow: print("will show"); break
                case .willHide: print("will hide"); break
                case .didShow: print("did show"); break
                case .didHide: print("did hide"); break
                case .didButtonClick:
                    if let navController = self.navigationController {
                        Ronni.hide(from: navController)
                    }
                break

                default: break
            }
        }

Requirements

  • CocoaPods 1.0.0+

Installation

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

pod 'Ronni'

License

This project is licensed under the MIT license.

Copyright (c) 2015 Dmitriy Zhyzhko

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Latest podspec

{
    "name": "Ronni",
    "version": "1.1.1",
    "summary": "Library that will make the task of display messages simple",
    "description": "A convenient and easy to use library that will make the task of display messages simple",
    "homepage": "https://github.com/z-four/Ronni",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Dmitriy Zhyzhko": "[email protected]"
    },
    "source": {
        "git": "https://github.com/z-four/Ronni.git",
        "tag": "1.1.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Ronni/Classes/**/*.swift",
    "resources": "Ronni/**/*.{xib,xcassets}",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This