Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tichise/popoverdialog
PopOverDialog is a PopOver style dialog.
https://github.com/tichise/popoverdialog
alert cocoapods dialog menu pop popover swift ui
Last synced: about 2 hours ago
JSON representation
PopOverDialog is a PopOver style dialog.
- Host: GitHub
- URL: https://github.com/tichise/popoverdialog
- Owner: tichise
- License: mit
- Created: 2018-12-08T06:08:35.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-01T18:25:54.000Z (almost 2 years ago)
- Last Synced: 2024-04-24T08:29:34.978Z (8 months ago)
- Topics: alert, cocoapods, dialog, menu, pop, popover, swift, ui
- Language: Swift
- Homepage:
- Size: 17.6 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
### PopOverDialog ![CocoaPods Version](https://img.shields.io/cocoapods/v/PopOverDialog.svg?style=flat) ![Platform](https://img.shields.io/cocoapods/p/PopOverDialog.svg?style=flat) ![License](https://img.shields.io/cocoapods/l/PopOverDialog.svg?style=flat)
PopOverDialog is a PopOver style dialog view.
Please use it when you want to display confirmation screen without screen transition.
### Image
#### iPhone
### Examples
#### for Swift
```
import UIKit
import PopOverDialogclass SampleViewController: UIViewController, UIAdaptivePresentationControllerDelegate {
@IBOutlet weak var baseTextView:UITextView?
override func viewDidLoad() {
super.viewDidLoad()let barButtonItem:UIBarButtonItem = UIBarButtonItem(title: "menu", style: .plain, target: self, action: #selector(SampleViewController.openDialog(sender:)))
self.navigationItem.rightBarButtonItem = barButtonItem
}override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}@objc public func openDialog(sender:UIBarButtonItem) {
let popOverDialogViewController = PopOverDialogViewController.instantiate()
popOverDialogViewController.setButtonText("OK")
popOverDialogViewController.setMessage("Do you want to send mail?")
popOverDialogViewController.setSubMessage("When you press OK, the mail will be sent immediately.")popOverDialogViewController.setShowsVerticalScrollIndicator(true)
popOverDialogViewController.setSeparatorStyle(UITableViewCellSeparatorStyle.singleLine)
popOverDialogViewController.popoverPresentationController?.barButtonItem = sender
popOverDialogViewController.preferredContentSize = CGSize(width: 300, height:110)
popOverDialogViewController.presentationController?.delegate = selfpopOverDialogViewController.setMessageFont(UIFont.systemFont(ofSize: 16))
popOverDialogViewController.setSubMessageFont(UIFont.systemFont(ofSize: 12))
popOverDialogViewController.setButtonTextFont(UIFont.systemFont(ofSize: 14))
popOverDialogViewController.setButtonTextColor(UIColor.black)popOverDialogViewController.completionHandler = { () -> Void in
}
present(popOverDialogViewController, animated: true, completion: nil)
}func adaptivePresentationStyle(for controller: UIPresentationController) -> UIModalPresentationStyle {
return UIModalPresentationStyle.none
}func adaptivePresentationStyle(for controller: UIPresentationController, traitCollection: UITraitCollection) -> UIModalPresentationStyle {
return UIModalPresentationStyle.none
}
}
```### Installation (CocoaPods)
`pod PopOverDialog`### CocoaPods URL
- [PopOverDialog on CocoaPods.org](https://cocoapods.org/pods/PopOverDialog)### License
PopOverDialog is available under the MIT license. See the LICENSE file for more info.