Skip to content

A popup message that dims the background and can display an image and text

License

Notifications You must be signed in to change notification settings

ga083/PopupOverlay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A popup message that dims the background and can display an image and text

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors