TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Jun 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Burak Üstün.
To run the example project, clone the repo, and run pod install
from the Example directory first.
Setup the BUSimplePopupManager
import UIKit
import BUSimplePopup
class ViewController: UIViewController {
let PopupManager = BUSimplePopupManager()
override func viewDidLoad() {
super.viewDidLoad()
PopupManager.PopupsBackgroundColor = .white
PopupManager.PopupsTitleTextColor = .black
PopupManager.PopupsBodyTextColor = .darkGray
PopupManager.PopupBackgroundAlpha = 1.0
PopupManager.PopupsTitleFont = UIFont.init(name: "Futura", size: 20)!
}
Create popup and show!
let popup:BUSimplePopup = BUSimplePopup.init(_title: "BUSimplePopup",
_body: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
_image: UIImage.init(named: "logo"))
PopupManager.showPopup(Popup: popup)
You can customize everything below
/**
* The active Popup, if there is one. nil if no Popup is currently active.
*/
public var activePopup: BUSimplePopupView?
/**
* Use to set the background color of Popups.
*/
public var PopupsBackgroundColor: UIColor = UIColor.white
/**
* Use to set the title text color of Popups
*/
public var PopupsTitleTextColor: UIColor = UIColor.black
/**
* Use to set the title text aligment of Popups
*/
public var PopupsTitleTextAligment: NSTextAlignment = .center
/**
* Use to set the body text aligment of Popups
*/
public var PopupBodyTextAlignment: NSTextAlignment = .center
/**
* Use to set the Popup image Width
*/
public var PopupImageWidth:CGFloat = 75.0
/**
* Use to set the Popup image Height
*/
public var PopupImageHeight:CGFloat = 75.0
/**
* Use to set the Popup background alpha
*/
public var PopupBackgroundAlpha:CGFloat = 1.0
/**
* Use to set the body text color of Popups.
*/
public var PopupsBodyTextColor: UIColor = UIColor.black
/**
* Use to set the title font of Popups.
*/
public var PopupsTitleFont: UIFont = UIFont.boldSystemFont(ofSize: 14.0)
/**
* Use to set the body font of Popups.
*/
public var PopupsBodyFont: UIFont = UIFont.systemFont(ofSize: 12.0)
BUSimplePopup is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "BUSimplePopup"
Burak Üstün
[email protected]
Twitter.com/burakustn
BUSimplePopup is available under the MIT license. See the LICENSE file for more info.