CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

PopupOverlay 1.1.0

PopupOverlay 1.1.0

Maintained by Alexander Solis.



  • By
  • Alexander Solis

PopupOverlay

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:

  • PopupOverlay.swift
  • UILabel+PopupOverlay.swift
  • UIView+PopupOverlay.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