Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
react-native-geek-image-editor
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
huanglu
react-native-geek-image-editor
Commits
affefcd0
Commit
affefcd0
authored
Mar 16, 2020
by
huanglu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
f5ef3a6f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
6 deletions
+29
-6
ImageEditorManger.m
ios/ImageEditorManger.m
+1
-1
project.pbxproj
ios/RNGeekImageEditor.xcodeproj/project.pbxproj
+0
-0
Utils.h
ios/Utils.h
+1
-1
Utils.m
ios/Utils.m
+27
-4
No files found.
ios/ImageEditorManger.m
View file @
affefcd0
...
...
@@ -53,7 +53,7 @@ ImageEditorManger *imageEditorManager = nil;
data
.
imageURL
=
[
NSURL
URLWithString
:
image
.
origImage
];
[
dataSource
addObject
:
data
];
}
UI
Window
*
currentWindow
=
[
Utils
currentWindow
]
;
UI
View
*
currentWindow
=
[
Utils
getCurrentVC
].
view
;
self
.
browser
.
dataSourceArray
=
dataSource
;
self
.
browser
.
currentPage
=
model
.
index
;
if
(
model
.
editable
)
{
...
...
ios/RNGeekImageEditor.xcodeproj/project.pbxproj
View file @
affefcd0
This diff is collapsed.
Click to expand it.
ios/Utils.h
View file @
affefcd0
...
...
@@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
+
(
NSData
*
)
imageData
:(
UIImage
*
)
image
;
+
(
UI
Window
*
)
currentWindow
;
+
(
UI
ViewController
*
)
getCurrentVC
;
+
(
void
)
toVC
:(
UIViewController
*
)
vc
;
...
...
ios/Utils.m
View file @
affefcd0
...
...
@@ -73,13 +73,36 @@
return
data
;
}
+
(
UIWindow
*
)
currentWindow
{
return
[
UIApplication
sharedApplication
].
keyWindow
;
//获取当前屏幕显示的viewcontroller
+
(
UIViewController
*
)
getCurrentVC
{
UIViewController
*
result
=
nil
;
UIWindow
*
window
=
[[
UIApplication
sharedApplication
]
keyWindow
];
if
(
window
.
windowLevel
!=
UIWindowLevelNormal
)
{
NSArray
*
windows
=
[[
UIApplication
sharedApplication
]
windows
];
for
(
UIWindow
*
tmpWin
in
windows
)
{
if
(
tmpWin
.
windowLevel
==
UIWindowLevelNormal
)
{
window
=
tmpWin
;
break
;
}
}
}
UIView
*
frontView
=
[[
window
subviews
]
objectAtIndex
:
0
];
id
nextResponder
=
[
frontView
nextResponder
];
if
([
nextResponder
isKindOfClass
:[
UIViewController
class
]])
result
=
nextResponder
;
else
result
=
window
.
rootViewController
;
return
result
;
}
+
(
void
)
toVC
:
(
UIViewController
*
)
vc
{
UIWindow
*
window
=
[
Utils
currentWindow
];
UIViewController
*
rootVC
=
window
.
rootViewController
;
UIViewController
*
rootVC
=
[
Utils
getCurrentVC
];
vc
.
modalPresentationStyle
=
UIModalPresentationCustom
;
[
rootVC
presentViewController
:
vc
animated
:
true
completion
:
nil
];
}
...
...
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