UIAlertView-NSErrorAddition 1.0.1

UIAlertView-NSErrorAddition 1.0.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release May 2016

Maintained by azu, akuraru.




UIAlertView + NSError category library.

img

Installation

Usage

You can try it:

pod try UIAlertView-NSErrorAddition

Basic use case.

NSDictionary *userInfo = @{
    NSLocalizedDescriptionKey : @"Network Error",
    NSLocalizedFailureReasonErrorKey : @"Doesn't connect to network",
    NSLocalizedRecoverySuggestionErrorKey : @"Reload page after check the network.",
    NSLocalizedRecoveryOptionsErrorKey : @[@"OK"]
};

NSError *error = [NSError errorWithDomain:[[NSBundle bundleForClass:[self class]] bundleIdentifier] code:0 userInfo:userInfo];
UIAlertView *alertView = [[UIAlertView alloc] initWithError:error];
[alertView show];

Each key mapping to UIAlertView parts.

img

More Detail

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT