Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 1.21 KB

README.md

File metadata and controls

31 lines (19 loc) · 1.21 KB

EPSErrorHandling

EPSErrorHandling provides a category on UIViewController (ErrorHandling) which adds a method for presenting errors:

- (void)eps_presentError:(NSError *)error;

By default, eps_presentError: will show an alert using the localizedDescription of error as its title, and localizedFailureReason as the message. This method should be overridden in subclasses of UIViewController to customize error handling for specific situations.

Using with ReactiveCocoa

EPSErrorHandling can be used as a standard way to handles errors generated by RACCommand objects. For example:

[self rac_liftSelector:@selector(eps_presentError:) withSignals:self.viewModel.loginCommand.errors, nil];

Installation

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

pod "EPSErrorHandling"

Alternatively, include UIViewController+ErrorHandling.h and UIViewController+ErrorHandling.m in your project.

License

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