Fix 10.7 compatibility and add a window to show an exception log
This commit is contained in:
1 parent
60b1c60155
commit
d1360727ec
13 files changed
+452
No files matched your search
@@ -0,0 +1,26 @@
|
||||
#import "NSArray+Subscripting.h"
|
||||
#import <objc/runtime.h>
|
||||
|
||||
@implementation NSArray (Subscripting)
|
||||
|
||||
+ (void)load
|
||||
{
|
||||
Class class = [self class];
|
||||
|
||||
SEL swizzledSelector = @selector(bnr_objectAtIndexedSubscript:);
|
||||
|
||||
Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);
|
||||
|
||||
class_addMethod([NSArray class],
|
||||
@selector(objectAtIndexedSubscript:),
|
||||
method_getImplementation(swizzledMethod),
|
||||
method_getTypeEncoding(swizzledMethod)
|
||||
);
|
||||
}
|
||||
|
||||
- (id)bnr_objectAtIndexedSubscript:(NSInteger)index
|
||||
{
|
||||
return [self objectAtIndex:index];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user