|
@@ -116,12 +116,6 @@ @implementation UITableView (MJRefresh)
|
|
|
+ (void)load
|
|
+ (void)load
|
|
|
{
|
|
{
|
|
|
[self exchangeInstanceMethod1:@selector(reloadData) method2:@selector(mj_reloadData)];
|
|
[self exchangeInstanceMethod1:@selector(reloadData) method2:@selector(mj_reloadData)];
|
|
|
- [self exchangeInstanceMethod1:@selector(reloadRowsAtIndexPaths:withRowAnimation:) method2:@selector(mj_reloadRowsAtIndexPaths:withRowAnimation:)];
|
|
|
|
|
- [self exchangeInstanceMethod1:@selector(deleteRowsAtIndexPaths:withRowAnimation:) method2:@selector(mj_deleteRowsAtIndexPaths:withRowAnimation:)];
|
|
|
|
|
- [self exchangeInstanceMethod1:@selector(insertRowsAtIndexPaths:withRowAnimation:) method2:@selector(mj_insertRowsAtIndexPaths:withRowAnimation:)];
|
|
|
|
|
- [self exchangeInstanceMethod1:@selector(reloadSections:withRowAnimation:) method2:@selector(mj_reloadSections:withRowAnimation:)];
|
|
|
|
|
- [self exchangeInstanceMethod1:@selector(deleteSections:withRowAnimation:) method2:@selector(mj_deleteSections:withRowAnimation:)];
|
|
|
|
|
- [self exchangeInstanceMethod1:@selector(insertSections:withRowAnimation:) method2:@selector(mj_insertSections:withRowAnimation:)];
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- (void)mj_reloadData
|
|
- (void)mj_reloadData
|
|
@@ -130,48 +124,6 @@ - (void)mj_reloadData
|
|
|
|
|
|
|
|
[self executeReloadDataBlock];
|
|
[self executeReloadDataBlock];
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-- (void)mj_insertRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation
|
|
|
|
|
-{
|
|
|
|
|
- [self mj_insertRowsAtIndexPaths:indexPaths withRowAnimation:animation];
|
|
|
|
|
-
|
|
|
|
|
- [self executeReloadDataBlock];
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-- (void)mj_deleteRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation
|
|
|
|
|
-{
|
|
|
|
|
- [self mj_deleteRowsAtIndexPaths:indexPaths withRowAnimation:animation];
|
|
|
|
|
-
|
|
|
|
|
- [self executeReloadDataBlock];
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-- (void)mj_reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation
|
|
|
|
|
-{
|
|
|
|
|
- [self mj_reloadRowsAtIndexPaths:indexPaths withRowAnimation:animation];
|
|
|
|
|
-
|
|
|
|
|
- [self executeReloadDataBlock];
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-- (void)mj_insertSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation
|
|
|
|
|
-{
|
|
|
|
|
- [self mj_insertSections:sections withRowAnimation:animation];
|
|
|
|
|
-
|
|
|
|
|
- [self executeReloadDataBlock];
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-- (void)mj_deleteSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation
|
|
|
|
|
-{
|
|
|
|
|
- [self mj_deleteSections:sections withRowAnimation:animation];
|
|
|
|
|
-
|
|
|
|
|
- [self executeReloadDataBlock];
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-- (void)mj_reloadSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation
|
|
|
|
|
-{
|
|
|
|
|
- [self mj_reloadSections:sections withRowAnimation:animation];
|
|
|
|
|
-
|
|
|
|
|
- [self executeReloadDataBlock];
|
|
|
|
|
-}
|
|
|
|
|
@end
|
|
@end
|
|
|
|
|
|
|
|
@implementation UICollectionView (MJRefresh)
|
|
@implementation UICollectionView (MJRefresh)
|
|
@@ -179,12 +131,6 @@ @implementation UICollectionView (MJRefresh)
|
|
|
+ (void)load
|
|
+ (void)load
|
|
|
{
|
|
{
|
|
|
[self exchangeInstanceMethod1:@selector(reloadData) method2:@selector(mj_reloadData)];
|
|
[self exchangeInstanceMethod1:@selector(reloadData) method2:@selector(mj_reloadData)];
|
|
|
- [self exchangeInstanceMethod1:@selector(reloadItemsAtIndexPaths:) method2:@selector(mj_reloadItemsAtIndexPaths:)];
|
|
|
|
|
- [self exchangeInstanceMethod1:@selector(insertItemsAtIndexPaths:) method2:@selector(mj_insertItemsAtIndexPaths:)];
|
|
|
|
|
- [self exchangeInstanceMethod1:@selector(deleteItemsAtIndexPaths:) method2:@selector(mj_deleteItemsAtIndexPaths:)];
|
|
|
|
|
- [self exchangeInstanceMethod1:@selector(reloadSections:) method2:@selector(mj_reloadSections:)];
|
|
|
|
|
- [self exchangeInstanceMethod1:@selector(insertSections:) method2:@selector(mj_insertSections:)];
|
|
|
|
|
- [self exchangeInstanceMethod1:@selector(deleteSections:) method2:@selector(mj_deleteSections:)];
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- (void)mj_reloadData
|
|
- (void)mj_reloadData
|
|
@@ -193,46 +139,4 @@ - (void)mj_reloadData
|
|
|
|
|
|
|
|
[self executeReloadDataBlock];
|
|
[self executeReloadDataBlock];
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-- (void)mj_insertSections:(NSIndexSet *)sections
|
|
|
|
|
-{
|
|
|
|
|
- [self mj_insertSections:sections];
|
|
|
|
|
-
|
|
|
|
|
- [self executeReloadDataBlock];
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-- (void)mj_deleteSections:(NSIndexSet *)sections
|
|
|
|
|
-{
|
|
|
|
|
- [self mj_deleteSections:sections];
|
|
|
|
|
-
|
|
|
|
|
- [self executeReloadDataBlock];
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-- (void)mj_reloadSections:(NSIndexSet *)sections
|
|
|
|
|
-{
|
|
|
|
|
- [self mj_reloadSections:sections];
|
|
|
|
|
-
|
|
|
|
|
- [self executeReloadDataBlock];
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-- (void)mj_insertItemsAtIndexPaths:(NSArray *)indexPaths
|
|
|
|
|
-{
|
|
|
|
|
- [self mj_insertItemsAtIndexPaths:indexPaths];
|
|
|
|
|
-
|
|
|
|
|
- [self executeReloadDataBlock];
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-- (void)mj_deleteItemsAtIndexPaths:(NSArray *)indexPaths
|
|
|
|
|
-{
|
|
|
|
|
- [self mj_deleteItemsAtIndexPaths:indexPaths];
|
|
|
|
|
-
|
|
|
|
|
- [self executeReloadDataBlock];
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-- (void)mj_reloadItemsAtIndexPaths:(NSArray *)indexPaths
|
|
|
|
|
-{
|
|
|
|
|
- [self mj_reloadItemsAtIndexPaths:indexPaths];
|
|
|
|
|
-
|
|
|
|
|
- [self executeReloadDataBlock];
|
|
|
|
|
-}
|
|
|
|
|
@end
|
|
@end
|