iOS: format code
This commit is contained in:
		| @@ -225,7 +225,7 @@ - (void)blend:(NSDictionary *)props { | |||||||
|     if (self.needReload) { |     if (self.needReload) { | ||||||
|         dispatch_async(dispatch_get_main_queue(), ^{ |         dispatch_async(dispatch_get_main_queue(), ^{ | ||||||
|             self.rowCount = self.itemCount + (self.loadMore ? 1 : 0); |             self.rowCount = self.itemCount + (self.loadMore ? 1 : 0); | ||||||
|             if (self.itemViewIds.count != 0 && self.itemCount > oldItemCount && oldItemCount > 0){ |             if (self.itemViewIds.count != 0 && self.itemCount > oldItemCount && oldItemCount > 0) { | ||||||
|                 NSMutableArray *indexPaths = [[NSMutableArray alloc] init]; |                 NSMutableArray *indexPaths = [[NSMutableArray alloc] init]; | ||||||
|                 for (NSUInteger l = oldItemCount; l < self.itemCount; l++) { |                 for (NSUInteger l = oldItemCount; l < self.itemCount; l++) { | ||||||
|                     NSIndexPath *p = [NSIndexPath indexPathForRow:l inSection:0]; |                     NSIndexPath *p = [NSIndexPath indexPathForRow:l inSection:0]; | ||||||
| @@ -235,25 +235,25 @@ - (void)blend:(NSDictionary *)props { | |||||||
|                 if (@available(iOS 11.0, *)) { |                 if (@available(iOS 11.0, *)) { | ||||||
|                     [self.view performBatchUpdates:^{ |                     [self.view performBatchUpdates:^{ | ||||||
|                         @try { |                         @try { | ||||||
|                             if (oldLoadMore != self.loadMore){ |                             if (oldLoadMore != self.loadMore) { | ||||||
|                                 if (self.loadMore) { |                                 if (self.loadMore) { | ||||||
|                                     [self.view insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationNone]; |                                     [self.view insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationNone]; | ||||||
|                                     [self.view insertRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:self.itemCount inSection:0]] withRowAnimation:UITableViewRowAnimationNone]; |                                     [self.view insertRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:self.itemCount inSection:0]] withRowAnimation:UITableViewRowAnimationNone]; | ||||||
|                                 }else { |                                 } else { | ||||||
|                                     [self.view deleteRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:oldItemCount inSection:0]] withRowAnimation:UITableViewRowAnimationNone]; |                                     [self.view deleteRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:oldItemCount inSection:0]] withRowAnimation:UITableViewRowAnimationNone]; | ||||||
|                                     [self.view insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationNone]; |                                     [self.view insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationNone]; | ||||||
|                                 } |                                 } | ||||||
|                             }else { |                             } else { | ||||||
|                                 [self.view insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationNone]; |                                 [self.view insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationNone]; | ||||||
|                             } |                             } | ||||||
|                         } @catch (NSException *exception) { |                         } @catch (NSException *exception) { | ||||||
|                             [self.view reloadData]; |                             [self.view reloadData]; | ||||||
|                         } |                         } | ||||||
|                     } completion:nil]; |                     }                   completion:nil]; | ||||||
|                 } else { |                 } else { | ||||||
|                     [self.view reloadData]; |                     [self.view reloadData]; | ||||||
|                 } |                 } | ||||||
|             }else { |             } else { | ||||||
|                 [self.view reloadData]; |                 [self.view reloadData]; | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user