| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
SDCAlertView is intended as a pixel-for-pixel UIAlertView duplicate in iOS 7, with added functionality that a particular company at a particular developer's conference promised, but never delivered. Most importantly, SDCAlertView adds support for custom content using the contentView property.
SDCAlertView doesn't just look like a system alert in terms of user interface elements, it is the result of completely reverse-engineering UIAlertView. The view hierarchy, labels, table views, animations, everything has been looked at and incorporated as much as possible.
Check for yourself:
Special interaction with the system. The system does not consider instances of SDCAlertView actual alerts, which means that, for example, the alertViewCancel: method from SDCAlertViewDelegate will never be called.
Text field placeholders in different languages. Login and Password are entered as localized strings, but they aren't actually translated.
The only thing that is currently lacking in SDCAlertView is properly queueing and displaying multiple alert views (see issue #3). All other features are expected to work exactly like UIAlertView.
The usage is almost exactly the same as it is for UIAlertView. Most documentation that applies to some UIAlertView API, also applies to the same SDCAlertView API. There are a few exceptions, please see SDCAlertView.h for details.
To use the contentView property, you have to apply auto-layout constraints to it and its subviews. The contentView property will be the same width as the alert, but the height is dependent on its content, so you have to set that too. See SDCViewController for a few examples of how to use contentView. See SDCAutoLayout for an NSLayoutConstraint category that makes creating constraints a little easier.
The easiest way to install is, of course, by using Cocoapods. The name of the pod is SDCAlertView.
If you're not using Cocoapods, you need at least:
The project also depends on RBBAnimation and SDCAutoLayout. These dependencies are handled for you if you use Cocoapods.
Some credits are in order:
| Back | FazBrowse Home | New Git URL |