Skip to content

ElectricPeelSoftware/EPSErrorHandling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Categories on UIViewController to help with error handling.

Resources

License

Stars

Watchers

Forks

Packages

No packages published