All Projects → davnag → Djsemimodalviewcontroller

davnag / Djsemimodalviewcontroller

Licence: mit
Simple semi modal presentation dialog with stacked content

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Djsemimodalviewcontroller

React Poppop
A mobile support and multi-directional modal for ReactJS
Stars: ✭ 78 (-43.07%)
Mutual labels:  dialog, modal
Customalertviewdialogue
Custom AlertView Dialogue is the world's most advanced alert view library. Custom AlertView Dialogue includes simple message popups, confirmation alerts, selector popups, action sheet bottom menus, and input/feedback contact forms.
Stars: ✭ 100 (-27.01%)
Mutual labels:  dialog, modal
Ng Popups
🎉 Alert, confirm and prompt dialogs for Angular. Simple as that.
Stars: ✭ 80 (-41.61%)
Mutual labels:  dialog, modal
Ng2 Bootstrap Modal
Library to simplify the work with bootstrap modal dialogs
Stars: ✭ 53 (-61.31%)
Mutual labels:  dialog, modal
A11y Dialog
A very lightweight and flexible accessible modal dialog script.
Stars: ✭ 1,768 (+1190.51%)
Mutual labels:  dialog, modal
React Native Alert Pro
The Pro Version of React Native Alert (Android & iOS)
Stars: ✭ 69 (-49.64%)
Mutual labels:  dialog, modal
Launchy
Launchy: An Accessible Modal Window
Stars: ✭ 89 (-35.04%)
Mutual labels:  dialog, modal
React Useportal
🌀 React hook for Portals
Stars: ✭ 698 (+409.49%)
Mutual labels:  dialog, modal
Swifty360player
iOS 360-degree video player streaming from an AVPlayer.
Stars: ✭ 118 (-13.87%)
Mutual labels:  cocoapods, uiviewcontroller
Towebviewcontroller
A view controller class for iOS that allows users to view web pages directly within an app.
Stars: ✭ 1,500 (+994.89%)
Mutual labels:  cocoapods, uiviewcontroller
Bootstrap Show Modal
A Bootstrap 4 / jQuery plugin wrapper, to create modals dynamically in JavaScript
Stars: ✭ 38 (-72.26%)
Mutual labels:  dialog, modal
Svelte Simple Modal
A simple, small, and content-agnostic modal for Svelte v3
Stars: ✭ 130 (-5.11%)
Mutual labels:  dialog, modal
Rodal
A React modal with animations.
Stars: ✭ 754 (+450.36%)
Mutual labels:  dialog, modal
Realm Loginkit
A generic interface for logging in to Realm Mobile Platform apps
Stars: ✭ 70 (-48.91%)
Mutual labels:  cocoapods, uiviewcontroller
Simplelightbox
Touch-friendly image lightbox for mobile and desktop
Stars: ✭ 744 (+443.07%)
Mutual labels:  dialog, modal
Jbox
jBox is a jQuery plugin that makes it easy to create customizable tooltips, modal windows, image galleries and more.
Stars: ✭ 1,251 (+813.14%)
Mutual labels:  dialog, modal
Ngx Modialog
Modal / Dialog for Angular
Stars: ✭ 691 (+404.38%)
Mutual labels:  dialog, modal
Splarkcontroller
Custom transition between controllers. Settings controller for your iOS app.
Stars: ✭ 693 (+405.84%)
Mutual labels:  modal, uiviewcontroller
React Native Push Notification Popup
A <NotificationPopup/> component for presenting your own push notification in react-native app
Stars: ✭ 111 (-18.98%)
Mutual labels:  dialog, modal
Vue Final Modal
🍕Vue Final Modal is a tiny, renderless, mobile-friendly, feature-rich modal component for Vue.js.
Stars: ✭ 128 (-6.57%)
Mutual labels:  dialog, modal

DJSemiModalViewController

DJSemiModalViewController is a semi modal presentation dialog that grows with it´s added content. DJSemiModalViewController works for iPhone and iPad. DJSemiModalViewController mimic the design of the default NFC popup dialog.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

DJSemiModalViewController is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'DJSemiModalViewController'

How to use it

@IBAction func buttonAction(_ sender: Any) {

    let controller = DJSemiModalViewController()
    
    controller.title = "Title"
    
    let label = UILabel()
    label.text = "An example label"
    label.textAlignment = .center
    controller.addArrangedSubview(view: label)

    controller.presentOn(presentingViewController: self, animated: true, onDismiss: { })
}

Add views to content StackView

public func addArrangedSubview(view: UIView)

public func addArrangedSubview(view: UIView, height: CGFloat)

public func insertArrangedSubview(view: UIView, at index: Int)

Presenting the ViewController

public func presentOn(presentingViewController: UIViewController, animated: Bool = true, onDismiss dismissHandler: ViewWillDismiss?)

Settings

controller.automaticallyAdjustsContentHeight = true
  
controller.maxWidth = 420

controller.minHeight = 200

controller.titleLabel.font = UIFont.systemFont(ofSize: 22, weight: UIFont.Weight.bold)

controller.closeButton.setTitle("Done", for: .normal)

Author

David Jonsén

License

DJSemiModalViewController is available under the MIT license. See the LICENSE file for more info.

Todo

  • Make it possible to turn close methods on/off; close button, tap on background, drag gesture.

Credits

Photo by rawpixel.com on Unsplash

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].