Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (23 sloc) 639 Bytes
#import "UITableView+ISRefreshControl.h"
#import "ISMethodSwizzling.h"
#import "ISRefreshControl.h"
#import <objc/runtime.h>
@implementation UITableView (ISRefreshControl)
+ (void)load
{
@autoreleasepool {
if (![UIRefreshControl class]) {
ISSwizzleInstanceMethod([self class], @selector(initWithCoder:), @selector(_initWithCoder:));
}
}
}
- (id)_initWithCoder:(NSCoder *)coder
{
self = [self _initWithCoder:coder];
if (self) {
ISRefreshControl *refreshControl = [coder decodeObjectForKey:@"UIRefreshControl"];
[self addSubview:refreshControl];
}
return self;
}
@end
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.