Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
flutter_plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林生雨
flutter_plugin
Commits
1a19ea78
Commit
1a19ea78
authored
Oct 29, 2019
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
c78ddd69
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
9 deletions
+17
-9
workspace.xml
.idea/workspace.xml
+0
-0
AlbumModel.dart
example/lib/AlbumModel/page/album/AlbumModel.dart
+5
-0
GengmeiFlutterPlugin.m
ios/Classes/GengmeiFlutterPlugin.m
+12
-9
No files found.
.idea/workspace.xml
View file @
1a19ea78
This diff is collapsed.
Click to expand it.
example/lib/AlbumModel/page/album/AlbumModel.dart
View file @
1a19ea78
...
...
@@ -223,6 +223,11 @@ class AlbumModel {
}
else
{
iosAlbum
(
_selectList
,
context
,
(
value
)
{
print
(
value
);
// iosAlbum(_selectList, context, (image) {
// iosAlbum(_selectList, context, (video) {
// print("IM $image VIDEI ${video}");
// });
// });
Navigator
.
pop
(
context
,
List
<
String
>.
from
(
value
)[
0
]);
});
}
...
...
ios/Classes/GengmeiFlutterPlugin.m
View file @
1a19ea78
...
...
@@ -230,6 +230,12 @@ NSString *cacheDirectory;
if
(
path
!=
nil
){
dispatch_async
(
queue
,
^
{
[
self
.
channelList
removeAllObjects
];
if
(
path
.
count
==
0
){
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
resultTemp
]
:
self
.
channelList
];
});
return
;
}
self
.
channelSize
=
0
;
self
.
channelAllSize
=
path
.
count
;
PHVideoRequestOptions
*
options
=
[[
PHVideoRequestOptions
alloc
]
init
];
...
...
@@ -261,7 +267,6 @@ NSString *cacheDirectory;
}];
}
else
{
if
([
fileManager
fileExistsAtPath
:
tempTake
]){
NSLog
(
@"1111"
);
self
.
channelSize
++
;
[
self
.
channelList
addObject
:[
NSString
stringWithFormat
:
@"%@"
,
tempTake
]];
if
(
self
.
channelSize
==
self
.
channelAllSize
){
...
...
@@ -270,7 +275,6 @@ NSString *cacheDirectory;
});
}
}
else
{
NSLog
(
@"222"
);
int
picWidth
=
[
assets
pixelWidth
];
int
picHeight
=
[
assets
pixelHeight
];
float
tempScareSize
=
1
;
...
...
@@ -282,13 +286,12 @@ NSString *cacheDirectory;
CGSize
temp
=
CGSizeMake
(
picWidth
*
tempScareSize
,
picHeight
*
tempScareSize
);
[[
PHImageManager
defaultManager
]
requestImageForAsset
:
assets
targetSize
:
temp
contentMode
:
PHImageContentModeDefault
options
:
imageRequestOption
resultHandler
:^
(
UIImage
*
_Nullable
res
,
NSDictionary
*
_Nullable
info
)
{
// @autoreleasepool{
NSLog
(
@"33333"
);
NSData
*
data
=
UIImageJPEGRepresentation
(
res
,
0
.
8
)
;
[
data
writeToFile
:
tempTake
atomically
:
YES
];
data
=
nil
;
res
=
nil
;
// }
@autoreleasepool
{
NSData
*
data
=
UIImageJPEGRepresentation
(
res
,
0
.
8
)
;
[
data
writeToFile
:
tempTake
atomically
:
YES
];
data
=
nil
;
res
=
nil
;
}
self
.
channelSize
++
;
[
self
.
channelList
addObject
:[
NSString
stringWithFormat
:
@"%@"
,
tempTake
]];
if
(
self
.
channelSize
==
self
.
channelAllSize
){
...
...
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