Latest 1.2.0
Homepage https://github.com/ImperialDevelopment/IDPopup
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

Version
License
Platform

IDPopup is a easy to use Pod to show Popups on the bottom of the Screen indepentend from the view hierarchy of your app.

Alt Text

General Usage

Create a IDPopup with one of this constructor:

let popup = IDPopup(text: "Default IDPopup")
let popup = IDPopup(text: "Default IDPopupnDismissed after 5sec", dismissAfter: 5)
let popup = IDPopup(text: "Default IDPopupnDismissable Popup", isDismissable: true)

Show a IDPopup:

popup.show()

Dismiss a IDPopup:

popup.dismiss() // Dismisses the Popup
popup.dismiss(afer: 5) // Dismisses the Popup after 5sec
IDPopup.dismissAll() // Dismisses all Popups
IDPopup.dismiss(identifier: "default_popup") // Dismisses the Popup with the identifier "default_popup"

Styling an IDPopup

IDPopup ships with five styles of Popups:

  • IDPopup: Popup with white Background. For General Use.
  • IDErrorPopup: Popup with red Background.
  • IDWarningPopup: Popup with yellow Background.
  • IDSuccessPopup: Popup with green Background.
  • IDDebugPopup: Popup with grey Background.

You can create you own style of Popups by subclassing IDPopup or one of its childs.

Anatomy of an IDPopup

A IDPopup has in the center a UILabel which can show two lines of text.

To the right of the Label is a UIButton with an aspect ratio of 1:1.

To the left of the Label is a UIImageView for a thumb. (By default the image is nil).

Configure IDPopups

IDPopup are configured by the IDPopupConfiguration.

  • leftPopupInset: Constant of the left Inset of IDPopups to the right screen-edge
  • rightPopupInset: Constant of the right Inset of IDPopups to the right screen-edge.
  • popupDistance: Distance between IDPopups or the bottom of the screen.
  • maxPopupCount: Defines the maximum amount of IDPopups which are allowed to be shown on the Screen..
  • ignoredPopupClasses: Array of IDPopup Types and subclasses of this Types, which should not be diplayed.

With the IDPopupConfiguration you can configure, that IDDebugPopups are only shown for a Dev App:

#if DEBUG
  IDPopupConfiguration.current.ignoredPopupClasses = []
#else
  IDPopupConfiguration.current.ignoredPopupClasses = [IDDebugPopup.self]
#endif

Update a IDPopup

Set the Variables of an IDPopup

The text, thumbImage, buttonImage and isDismissable are updatable can be changed at every time.

Setup an IDPopup to be updatable

IDPopup has an Update-Engine integrated.

  1. Assign an identifier to an IDPopup:
    IDPopup(identifier:"default_popup", text: "Default IDPopup").show()
  2. Done

When an IDPopup has an identifier and a Popup with the same identifier is already presented, the text of the old popup updates, the popup shakes and the dismissTimer is resetted.

Installation

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

pod "IDPopup"

Author

Michael Schoder, [email protected]

License

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

Popup Thumbs and Button Image are provided by https://icons8.com

Latest podspec

{
    "name": "IDPopup",
    "version": "1.2.0",
    "summary": "View-hierachy independent Popups for iOS",
    "description": "IDPopup is a easy to use Pod to show Popups on the bottom of the Screen indepentend from the view hierarchy of your app.",
    "homepage": "https://github.com/ImperialDevelopment/IDPopup",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Michael Schoder": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ImperialDevelopment/IDPopup.git",
        "tag": "1.2.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "IDPopup/Classes/**/*",
    "resources": "IDPopup/Assets/**/*",
    "frameworks": "UIKit",
    "pushed_with_swift_version": "3.1"
}

Pin It on Pinterest

Share This