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
6f7646b5
Commit
6f7646b5
authored
Oct 11, 2016
by
banchichen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加入获取照片名字的示例
parent
2de6a168
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
TZImagePickerController.xcodeproj/project.pbxproj
TZImagePickerController.xcodeproj/project.pbxproj
+0
-1
TZImagePickerController/ViewController.m
TZImagePickerController/ViewController.m
+21
-1
No files found.
TZImagePickerController.xcodeproj/project.pbxproj
View file @
6f7646b5
...
@@ -288,7 +288,6 @@
...
@@ -288,7 +288,6 @@
TargetAttributes
=
{
TargetAttributes
=
{
900E657B1C2BB8D5003D9A9E
=
{
900E657B1C2BB8D5003D9A9E
=
{
CreatedOnToolsVersion
=
7.2
;
CreatedOnToolsVersion
=
7.2
;
DevelopmentTeam
=
ZH74J4ERQH
;
};
};
900E65941C2BB8D5003D9A9E
=
{
900E65941C2BB8D5003D9A9E
=
{
CreatedOnToolsVersion
=
7.2
;
CreatedOnToolsVersion
=
7.2
;
...
...
TZImagePickerController/ViewController.m
View file @
6f7646b5
...
@@ -352,6 +352,9 @@
...
@@ -352,6 +352,9 @@
_isSelectOriginalPhoto
=
isSelectOriginalPhoto
;
_isSelectOriginalPhoto
=
isSelectOriginalPhoto
;
[
_collectionView
reloadData
];
[
_collectionView
reloadData
];
// _collectionView.contentSize = CGSizeMake(0, ((_selectedPhotos.count + 2) / 3 ) * (_margin + _itemWH));
// _collectionView.contentSize = CGSizeMake(0, ((_selectedPhotos.count + 2) / 3 ) * (_margin + _itemWH));
// 1.打印图片名字
[
self
printAssetsName
:
assets
];
}
}
// If user picking a video, this callback will be called.
// If user picking a video, this callback will be called.
...
@@ -372,7 +375,7 @@
...
@@ -372,7 +375,7 @@
// _collectionView.contentSize = CGSizeMake(0, ((_selectedPhotos.count + 2) / 3 ) * (_margin + _itemWH));
// _collectionView.contentSize = CGSizeMake(0, ((_selectedPhotos.count + 2) / 3 ) * (_margin + _itemWH));
}
}
#pragma mark Click Event
#pragma mark
-
Click Event
-
(
void
)
deleteBtnClik
:(
UIButton
*
)
sender
{
-
(
void
)
deleteBtnClik
:(
UIButton
*
)
sender
{
[
_selectedPhotos
removeObjectAtIndex
:
sender
.
tag
];
[
_selectedPhotos
removeObjectAtIndex
:
sender
.
tag
];
...
@@ -424,4 +427,21 @@
...
@@ -424,4 +427,21 @@
[
self
.
view
endEditing
:
YES
];
[
self
.
view
endEditing
:
YES
];
}
}
#pragma mark - Private
/// 打印图片名字
-
(
void
)
printAssetsName
:(
NSArray
*
)
assets
{
NSString
*
fileName
;
for
(
id
asset
in
assets
)
{
if
([
asset
isKindOfClass
:[
PHAsset
class
]])
{
PHAsset
*
phAsset
=
(
PHAsset
*
)
asset
;
fileName
=
[
phAsset
valueForKey
:
@"filename"
];
}
else
if
([
asset
isKindOfClass
:[
ALAsset
class
]])
{
ALAsset
*
alAsset
=
(
ALAsset
*
)
asset
;
fileName
=
alAsset
.
defaultRepresentation
.
filename
;;
}
NSLog
(
@"图片名字:%@"
,
fileName
);
}
}
@end
@end
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