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
3ef491aa
Commit
3ef491aa
authored
Dec 26, 2019
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ww
parent
6244d479
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
24 deletions
+21
-24
workspace.xml
.idea/workspace.xml
+2
-2
GengmeiFlutterPlugin.m
ios/Classes/GengmeiFlutterPlugin.m
+19
-22
No files found.
.idea/workspace.xml
View file @
3ef491aa
...
@@ -196,8 +196,8 @@
...
@@ -196,8 +196,8 @@
</option>
</option>
</component>
</component>
<component
name=
"ProjectFrameBounds"
extendedState=
"6"
>
<component
name=
"ProjectFrameBounds"
extendedState=
"6"
>
<option
name=
"x"
value=
"
157
"
/>
<option
name=
"x"
value=
"
62
"
/>
<option
name=
"y"
value=
"
23
"
/>
<option
name=
"y"
value=
"
120
"
/>
<option
name=
"width"
value=
"1440"
/>
<option
name=
"width"
value=
"1440"
/>
<option
name=
"height"
value=
"812"
/>
<option
name=
"height"
value=
"812"
/>
</component>
</component>
...
...
ios/Classes/GengmeiFlutterPlugin.m
View file @
3ef491aa
...
@@ -315,27 +315,24 @@ NSString *cacheDirectory;
...
@@ -315,27 +315,24 @@ NSString *cacheDirectory;
[[
PHImageManager
defaultManager
]
requestImageDataForAsset
:
assets
options
:
imageRequestOption
resultHandler
:^
(
NSData
*
_Nullable
imageData
,
NSString
*
_Nullable
dataUTI
,
UIImageOrientation
orientation
,
NSDictionary
*
_Nullable
info
)
{
[[
PHImageManager
defaultManager
]
requestImageDataForAsset
:
assets
options
:
imageRequestOption
resultHandler
:^
(
NSData
*
_Nullable
imageData
,
NSString
*
_Nullable
dataUTI
,
UIImageOrientation
orientation
,
NSDictionary
*
_Nullable
info
)
{
// [[PHImageManager defaultManager] requestImageForAsset:assets targetSize:temp contentMode:PHImageContentModeDefault options:imageRequestOption resultHandler:^(UIImage * _Nullable res, NSDictionary * _Nullable info) {
// [[PHImageManager defaultManager] requestImageForAsset:assets targetSize:temp contentMode:PHImageContentModeDefault options:imageRequestOption resultHandler:^(UIImage * _Nullable res, NSDictionary * _Nullable info) {
dispatch_async
(
concurrentQueue
,
^
{
@autoreleasepool
{
@autoreleasepool
{
UIImage
*
res
=
[
UIImage
imageWithData
:
imageData
];
UIImage
*
res
=
[
UIImage
imageWithData
:
imageData
];
NSData
*
data
=
UIImageJPEGRepresentation
(
res
,
0
.
6
)
;
NSData
*
data
=
UIImageJPEGRepresentation
(
res
,
0
.
6
)
;
[
data
writeToFile
:
tempTake1
atomically
:
YES
];
[
data
writeToFile
:
tempTake1
atomically
:
YES
];
res
=
nil
;
res
=
nil
;
data
=
nil
;
data
=
nil
;
}
}
NSMutableDictionary
*
dict
=
[[
NSMutableDictionary
alloc
]
init
];
NSMutableDictionary
*
dict
=
[[
NSMutableDictionary
alloc
]
init
];
[
dict
setObject
:
path
[
i
]
forKey
:
@"path"
];
[
dict
setObject
:
path
[
i
]
forKey
:
@"path"
];
[
dict
setObject
:
tempTake1
forKey
:
@"realImagePath"
];
[
dict
setObject
:
tempTake1
forKey
:
@"realImagePath"
];
@synchronized
(
self
)
{
@synchronized
(
self
)
{
self
.
channelSize
++
;
self
.
channelSize
++
;
[
self
.
channelList
addObject
:
dict
];
[
self
.
channelList
addObject
:
dict
];
}
}
if
(
self
.
channelSize
==
self
.
channelAllSize
){
if
(
self
.
channelSize
==
self
.
channelAllSize
){
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
resultTemp
]
:
self
.
channelList
];
[[
ResultManager
sharedSingleton
]
resultSuccess
:[
NSNumber
numberWithLong
:
resultTemp
]
:
self
.
channelList
];
}
});
}
});
}];
}];
});
});
}
}
...
@@ -505,7 +502,7 @@ NSString *cacheDirectory;
...
@@ -505,7 +502,7 @@ NSString *cacheDirectory;
}
}
-
(
BOOL
)
removeAllFilesAtPath
:(
NSString
*
)
path
{
-
(
BOOL
)
removeAllFilesAtPath
:(
NSString
*
)
path
{
NSDirectoryEnumerator
*
enumerator
=
[[
NSFileManager
defaultManager
]
enumeratorAtPath
:
path
];
NSDirectoryEnumerator
*
enumerator
=
[[
NSFileManager
defaultManager
]
enumeratorAtPath
:
path
];
BOOL
result
=
YES
;
BOOL
result
=
YES
;
for
(
NSString
*
fileName
in
enumerator
)
{
for
(
NSString
*
fileName
in
enumerator
)
{
...
...
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