Shortcut method for quick NSError presentation
//
// Copyright © 2010 Yuri Kotov
//
#import "NSError+ADVAlertPresentation.h"
#import <UIKit/UIKit.h>
@implementation NSError (ADVAlertPresentation)
- (void) displayInAlert
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error", nil)
message:[self localizedDescription]
delegate:nil
cancelButtonTitle:NSLocalizedString(@"OK", nil)
otherButtonTitles:nil];
[alert show];
#if !__has_feature(objc_arc)
[alert release];
#endif
}
@end
//
// Copyright © 2010 Yuri Kotov
//
#import <Foundation/Foundation.h>
@interface NSError (ADVAlertPresentation)
- (void) displayInAlert;
@end