Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
dz_TZImagePickerController
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shuijing
dz_TZImagePickerController
Commits
87f9a22a
Commit
87f9a22a
authored
Apr 19, 2018
by
yuzheng.tz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消灭demo中block相关警告
parent
328d1fc6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
14 deletions
+14
-14
TZImagePickerController/LxGridViewFlowLayout.m
TZImagePickerController/LxGridViewFlowLayout.m
+5
-5
TZImagePickerController/TZImagePickerController/TZImagePickerController.m
...troller/TZImagePickerController/TZImagePickerController.m
+1
-1
TZImagePickerController/TZImagePickerController/TZPhotoPreviewCell.m
...erController/TZImagePickerController/TZPhotoPreviewCell.m
+1
-1
TZImagePickerController/ViewController.m
TZImagePickerController/ViewController.m
+7
-7
No files found.
TZImagePickerController/LxGridViewFlowLayout.m
View file @
87f9a22a
...
@@ -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
:
)])
{
...
...
TZImagePickerController/TZImagePickerController/TZImagePickerController.m
View file @
87f9a22a
...
@@ -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
;
}];
}];
}
}
}
}
...
...
TZImagePickerController/TZImagePickerController/TZPhotoPreviewCell.m
View file @
87f9a22a
...
@@ -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
];
...
...
TZImagePickerController/ViewController.m
View file @
87f9a22a
...
@@ -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
];
}];
}];
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment