A simple custom popup view controller.
Here's an example usage.
final class MyViewController: UIViewController {
override func viewDidAppear(_ animated: Bool) {
let popupViewController = THDPopupViewController(
width: CGFloat(360),
top: CGFloat(110),
imageURL: "https://dummyimage.com/300x400",
leftButtonTitle: "No thanks",
rightButtonTitle: "✕ close",
imageButtonDidTap: {
print("imageButtonDidTap")
},
leftButtonDidTap: {
print("leftButtonDidTap")
},
rightButtonDidTap: {
print("rightButtonDidTap")
})
self.present(popupViewController, animated: true, completion: nil)
}
}
- For iOS 8+ projects with CocoaPods:
pod 'THDPopup', '~> 0.0'
THDPopup is under MIT license. See the LICENSE file for more info.