|ReleasedLast Release||Aug 2017|
Maintained by Michael Schoder.
|LOCLines of Code||361|
IDPopup is a easy to use Pod to show Popups on the bottom of the Screen indepentend from the view hierarchy of your app.
Create a IDPopup with one of this constructor:
let popup = IDPopup(text: "Default IDPopup") let popup = IDPopup(text: "Default IDPopup\nDismissed after 5sec", dismissAfter: 5) let popup = IDPopup(text: "Default IDPopup\nDismissable Popup", isDismissable: true)
Show a IDPopup:
Dismiss a IDPopup:
popup.dismiss() popup.dismiss(afer: 5) IDPopup.dismissAll()
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.
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).
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
The text, thumbImage, buttonImage and isDismissable are updatable can be changed at every time.
IDPopup has an Update-Engine integrated.
IDPopup(identifier:"default_popup", text: "Default IDPopup").show()
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.
IDPopup is available through CocoaPods. To install it, simply add the following line to your Podfile:
Michael Schoder, [email protected]
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