Latest | 1.0.1 |
---|---|
Homepage | https://github.com/ga083/PopupOverlay |
License | MIT |
Platforms | ios 10.0 |
Frameworks | Foundation |
Authors |
Based on SwiftOverlays done by peterprokop.
A popup message that dims the background and displays text and image.
Install
Cocoa Pods
Requires Cocoapods 1.5.0 or above.
target '<you project target>' do
pod 'PopupOverlay'
end
Manually
Just copy these files into your project:
- [x] PopupOverlay.swift
- [x] UIView+Centering.swift
Usage example
let popupOverlay = PopupOverlay()
popupOverlay.showPopupOverlay(text: "Lorem ipsum dolor sit amet!!!",
image: UIImage(named: "Apple")!)
For customizing the popup, change the public attributes before calling ‘showPopupOverlay’:
let popupOverlay = PopupOverlay()
popupOverlay.backgroundColor = UIColor.init(red: 0, green: 128, blue: 0, alpha: 0.3)
popupOverlay.textColor = UIColor.red
popupOverlay.font = UIFont.systemFont(ofSize: 20.0)
popupOverlay.padding = CGFloat(30)
popupOverlay.cornerRadius = CGFloat(30)
popupOverlay.showPopupOverlay(text: "Lorem ipsum dolor sit amet!!!",
image: UIImage(named: "Apple")!)
License
This project is licensed under the MIT License – see the LICENSE file for details
Latest podspec
{ "name": "PopupOverlay", "platforms": { "ios": "10.0" }, "swift_versions": "5.0", "version": "1.0.1", "summary": "A popup message that dims the background and displays text and image.", "description": "A popup message that dims the background and displays text and image.nCan be customized to change font, color, background, etc...", "homepage": "https://github.com/ga083/PopupOverlay", "license": { "type": "MIT", "file": "LICENSE" }, "authors": { "Alexander Solis": "[email protected]" }, "source": { "git": "https://github.com/ga083/PopupOverlay.git", "tag": "1.0.1" }, "source_files": [ "PopupOverlay", "PopupOverlay/**/*.{h,m}" ], "frameworks": "Foundation", "swift_version": "5.0" }
Tue, 04 Jun 2019 10:15:18 +0000