Awesome
Zingle
Zingle ā An alert will display underneath your UINavigationBar š
š„ Note: Zingle has a dependency to have a UINavigationController
in your app, which means it will not work/display in your app if you don't have a UINavigationController
linked to a UIViewController
in which you're planning to show an alert. However, it will get display even if the UINavigationBar
is hidden for a particular UIViewController
.
Screenshots
<table> <tr> <td align="center"><img src = "https://github.com/hemangshah/Zingle/blob/master/Screenshots/Screenshot-1.png" alt = "iPhone8+"></td> <td align="center"><img src = "https://github.com/hemangshah/Zingle/blob/master/Screenshots/Screenshot-2.png" alt = "iPhoneX"></td></tr> <tr><td align="center" colspan="2"><img src = "https://github.com/hemangshah/Zingle/blob/master/Screenshots/Screenshot-1-landscape.png" alt = "Landscape"></td></tr> </table>Features
- Easy to setup & Use
- Dynamic Property Configurations.
- Lightweight with zero dependencies.
Installation
- Manually ā Add
Zingle.swift
file to your Project.<br> - CocoaPods ā
pod 'Zingle'
You can read the CHANGELOG file for a particular release.
Setup
import Zingle
Usage
Zingle.init(duration: 0.5, delay: 3)
.message(message: "No Internet Connection.")
.messageIcon(icon: #imageLiteral(resourceName: "warning-icon"))
.messageColor(color: .white)
.messageFont(font: UIFont.init(name: "AmericanTypewriter", size: 15.0)!)
Ā .backgroundColor(color: UIColor.red)
.show()
You can also use it with in-built extension to UIViewController
.
//Create ZingleConfig.
let config = ZingleConfig()
config.delay = 2.0
config.duration = 1.0
config.messageColor = UIColor.white
config.messageFont = UIFont.init(name: "AmericanTypewriter", size: 15.0)!
config.backgroundColor = UIColor.purple.withAlphaComponent(0.5)
//Show Zingle with `self` (UIViewController) with custom configuration.
self.zingle(message: "No Internet Connection.", withConfig: config)
//or
//Show Zingle with `self` (UIViewController) with default configuration.
self.zingle(message: "No Internet Connection.")
You can watch to <b>Zingle</b> to see continuous updates. Stay tuned.
<b>Have an idea for improvements of this class? Please open an issue.</b> Ā Ā
Credits
<b>Hemang Shah</b>
You can shoot me an email to contact. Ā
Thank You!!
See the contributions for details.
License
The MIT License (MIT)
Read the LICENSE file for details.