Commit 87f9a22a authored by yuzheng.tz's avatar yuzheng.tz

消灭demo中block相关警告

parent 328d1fc6
...@@ -232,7 +232,7 @@ CG_INLINE CGPoint CGPointOffset(CGPoint point, CGFloat dx, CGFloat dy) ...@@ -232,7 +232,7 @@ CG_INLINE CGPoint CGPointOffset(CGPoint point, CGFloat dx, CGFloat dy)
[highlightedSnapshotView removeFromSuperview]; [highlightedSnapshotView removeFromSuperview];
if ([strongSelf.delegate respondsToSelector:@selector(collectionView:layout:didBeginDraggingItemAtIndexPath:)]) { if ([strongSelf.delegate respondsToSelector:@selector(collectionView:layout:didBeginDraggingItemAtIndexPath:)]) {
[strongSelf.delegate collectionView:strongSelf.collectionView layout:strongSelf didBeginDraggingItemAtIndexPath:_movingItemIndexPath]; [strongSelf.delegate collectionView:strongSelf.collectionView layout:strongSelf didBeginDraggingItemAtIndexPath:self->_movingItemIndexPath];
} }
} }
}]; }];
...@@ -269,17 +269,17 @@ CG_INLINE CGPoint CGPointOffset(CGPoint point, CGFloat dx, CGFloat dy) ...@@ -269,17 +269,17 @@ CG_INLINE CGPoint CGPointOffset(CGPoint point, CGFloat dx, CGFloat dy)
animations:^{ animations:^{
typeof(self) __strong strongSelf = weakSelf; typeof(self) __strong strongSelf = weakSelf;
if (strongSelf) { if (strongSelf) {
_beingMovedPromptView.center = movingItemCollectionViewLayoutAttributes.center; self->_beingMovedPromptView.center = movingItemCollectionViewLayoutAttributes.center;
} }
} }
completion:^(BOOL finished) { completion:^(BOOL finished) {
_longPressGestureRecognizer.enabled = YES; self->_longPressGestureRecognizer.enabled = YES;
typeof(self) __strong strongSelf = weakSelf; typeof(self) __strong strongSelf = weakSelf;
if (strongSelf) { if (strongSelf) {
[_beingMovedPromptView removeFromSuperview]; [self->_beingMovedPromptView removeFromSuperview];
_beingMovedPromptView = nil; self->_beingMovedPromptView = nil;
[strongSelf invalidateLayout]; [strongSelf invalidateLayout];
if ([strongSelf.delegate respondsToSelector:@selector(collectionView:layout:didEndDraggingItemAtIndexPath:)]) { if ([strongSelf.delegate respondsToSelector:@selector(collectionView:layout:didEndDraggingItemAtIndexPath:)]) {
......
...@@ -327,7 +327,7 @@ ...@@ -327,7 +327,7 @@
[[TZImageManager manager] getCameraRollAlbum:self.allowPickingVideo allowPickingImage:self.allowPickingImage needFetchAssets:NO completion:^(TZAlbumModel *model) { [[TZImageManager manager] getCameraRollAlbum:self.allowPickingVideo allowPickingImage:self.allowPickingImage needFetchAssets:NO completion:^(TZAlbumModel *model) {
photoPickerVc.model = model; photoPickerVc.model = model;
[self pushViewController:photoPickerVc animated:YES]; [self pushViewController:photoPickerVc animated:YES];
_didPushPhotoPickerVc = YES; self->_didPushPhotoPickerVc = YES;
}]; }];
} }
} }
......
...@@ -363,7 +363,7 @@ ...@@ -363,7 +363,7 @@
[[TZImageManager manager] getVideoWithAsset:self.model.asset completion:^(AVPlayerItem *playerItem, NSDictionary *info) { [[TZImageManager manager] getVideoWithAsset:self.model.asset completion:^(AVPlayerItem *playerItem, NSDictionary *info) {
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
self->_player = [AVPlayer playerWithPlayerItem:playerItem]; self->_player = [AVPlayer playerWithPlayerItem:playerItem];
self->_playerLayer = [AVPlayerLayer playerLayerWithPlayer:_player]; self->_playerLayer = [AVPlayerLayer playerLayerWithPlayer:self->_player];
self->_playerLayer.backgroundColor = [UIColor blackColor].CGColor; self->_playerLayer.backgroundColor = [UIColor blackColor].CGColor;
self->_playerLayer.frame = self.bounds; self->_playerLayer.frame = self.bounds;
[self.layer addSublayer:self->_playerLayer]; [self.layer addSublayer:self->_playerLayer];
......
...@@ -182,11 +182,11 @@ ...@@ -182,11 +182,11 @@
imagePickerVc.allowPickingMultipleVideo = self.allowPickingMuitlpleVideoSwitch.isOn; imagePickerVc.allowPickingMultipleVideo = self.allowPickingMuitlpleVideoSwitch.isOn;
imagePickerVc.isSelectOriginalPhoto = _isSelectOriginalPhoto; imagePickerVc.isSelectOriginalPhoto = _isSelectOriginalPhoto;
[imagePickerVc setDidFinishPickingPhotosHandle:^(NSArray<UIImage *> *photos, NSArray *assets, BOOL isSelectOriginalPhoto) { [imagePickerVc setDidFinishPickingPhotosHandle:^(NSArray<UIImage *> *photos, NSArray *assets, BOOL isSelectOriginalPhoto) {
_selectedPhotos = [NSMutableArray arrayWithArray:photos]; self->_selectedPhotos = [NSMutableArray arrayWithArray:photos];
_selectedAssets = [NSMutableArray arrayWithArray:assets]; self->_selectedAssets = [NSMutableArray arrayWithArray:assets];
_isSelectOriginalPhoto = isSelectOriginalPhoto; self->_isSelectOriginalPhoto = isSelectOriginalPhoto;
[_collectionView reloadData]; [self->_collectionView reloadData];
_collectionView.contentSize = CGSizeMake(0, ((_selectedPhotos.count + 2) / 3 ) * (_margin + _itemWH)); self->_collectionView.contentSize = CGSizeMake(0, ((self->_selectedPhotos.count + 2) / 3 ) * (self->_margin + self->_itemWH));
}]; }];
[self presentViewController:imagePickerVc animated:YES completion:nil]; [self presentViewController:imagePickerVc animated:YES completion:nil];
} }
...@@ -595,9 +595,9 @@ ...@@ -595,9 +595,9 @@
[_collectionView performBatchUpdates:^{ [_collectionView performBatchUpdates:^{
NSIndexPath *indexPath = [NSIndexPath indexPathForItem:sender.tag inSection:0]; NSIndexPath *indexPath = [NSIndexPath indexPathForItem:sender.tag inSection:0];
[_collectionView deleteItemsAtIndexPaths:@[indexPath]]; [self->_collectionView deleteItemsAtIndexPaths:@[indexPath]];
} completion:^(BOOL finished) { } completion:^(BOOL finished) {
[_collectionView reloadData]; [self->_collectionView reloadData];
}]; }];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment