转载自:《How To Present An Alert View Using UIAlertController When You Don't Have A View Controller》Over the summer I updated a number of apps to iOS 9. A common tasks for me was replacing the deprecated UIAlertView with new UIAlertController class. Generally this is easy to do, but there is one scenario that UIAlertView handles well that UIAlertController doesn’t support at all: displaying an alert view from parts of your code without a reference to the current view controller, for instance, displaying an alert view from the app delegate.
Trying to display an alert view using UIAlertController f
...
继续阅读
(70)