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
c5696534
Commit
c5696534
authored
Mar 16, 2020
by
sunzheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://dev.jiuaoedu.com/huanglu/react-native-geek-image-editor
parents
d455199f
8ecb4b46
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
14 deletions
+37
-14
ImageEditorManger.m
ios/ImageEditorManger.m
+5
-5
NSBundle+LFMediaEditing.m
...ontroller/class/common/category/NSBundle+LFMediaEditing.m
+1
-1
RNGeekImageEditor.podspec
ios/RNGeekImageEditor.podspec
+2
-2
project.pbxproj
ios/RNGeekImageEditor.xcodeproj/project.pbxproj
+0
-0
Utils.h
ios/Utils.h
+1
-1
Utils.m
ios/Utils.m
+27
-4
YBIBIconManager.m
ios/YBImageBrowser/Helper/YBIBIconManager.m
+1
-1
No files found.
ios/ImageEditorManger.m
View file @
c5696534
...
@@ -53,7 +53,7 @@ ImageEditorManger *imageEditorManager = nil;
...
@@ -53,7 +53,7 @@ ImageEditorManger *imageEditorManager = nil;
data
.
imageURL
=
[
NSURL
URLWithString
:
image
.
origImage
];
data
.
imageURL
=
[
NSURL
URLWithString
:
image
.
origImage
];
[
dataSource
addObject
:
data
];
[
dataSource
addObject
:
data
];
}
}
UI
Window
*
currentWindow
=
[
Utils
currentWindow
]
;
UI
View
*
rootView
=
[
Utils
getCurrentVC
].
view
;
self
.
browser
.
dataSourceArray
=
dataSource
;
self
.
browser
.
dataSourceArray
=
dataSource
;
self
.
browser
.
currentPage
=
model
.
index
;
self
.
browser
.
currentPage
=
model
.
index
;
if
(
model
.
editable
)
{
if
(
model
.
editable
)
{
...
@@ -65,13 +65,13 @@ ImageEditorManger *imageEditorManager = nil;
...
@@ -65,13 +65,13 @@ ImageEditorManger *imageEditorManager = nil;
}
}
UIEdgeInsets
safeInsets
=
UIEdgeInsetsMake
(
0
,
0
,
0
,
0
);
UIEdgeInsets
safeInsets
=
UIEdgeInsetsMake
(
0
,
0
,
0
,
0
);
if
(
@available
(
iOS
11
.
0
,
*
))
{
if
(
@available
(
iOS
11
.
0
,
*
))
{
safeInsets
=
currentWindo
w
.
safeAreaInsets
;
safeInsets
=
rootVie
w
.
safeAreaInsets
;
NSLog
(
@" safe insets %.2f, %.2f"
,
safeInsets
.
top
,
safeInsets
.
bottom
);
NSLog
(
@" safe insets %.2f, %.2f"
,
safeInsets
.
top
,
safeInsets
.
bottom
);
}
else
{
}
else
{
}
}
CGSize
size
=
currentWindow
.
screen
.
bounds
.
size
;
CGSize
size
=
rootView
.
bounds
.
size
;
[
self
.
browser
showToView
:
currentWindo
w
containerRect
:
CGRectMake
(
safeInsets
.
left
,
safeInsets
.
top
,
size
.
width
-
safeInsets
.
left
-
safeInsets
.
right
,
size
.
height
-
safeInsets
.
top
-
safeInsets
.
bottom
)];
[
self
.
browser
showToView
:
rootVie
w
containerRect
:
CGRectMake
(
safeInsets
.
left
,
safeInsets
.
top
,
size
.
width
-
safeInsets
.
left
-
safeInsets
.
right
,
size
.
height
-
safeInsets
.
top
-
safeInsets
.
bottom
)];
}
}
#pragma mark - private
#pragma mark - private
...
@@ -89,7 +89,7 @@ ImageEditorManger *imageEditorManager = nil;
...
@@ -89,7 +89,7 @@ ImageEditorManger *imageEditorManager = nil;
[
self
toEditVC
:
lfPhotoEditVC
];
[
self
toEditVC
:
lfPhotoEditVC
];
[
self
.
browser
.
defaultToolViewHandler
.
sheetView
hideWithAnimation
:
YES
];
[
self
.
browser
.
defaultToolViewHandler
.
sheetView
hideWithAnimation
:
YES
];
}
else
{
}
else
{
[
imgData
.
yb_auxiliaryViewHandler
()
yb_showIncorrectToastWithContainer
:[
Utils
currentWindow
]
text
:
@"图片未加载完成"
];
[
imgData
.
yb_auxiliaryViewHandler
()
yb_showIncorrectToastWithContainer
:[
Utils
getCurrentVC
].
view
text
:
@"图片未加载完成"
];
}
}
}
}
...
...
ios/LFMediaEditingController/LFMediaEditingController/class/common/category/NSBundle+LFMediaEditing.m
View file @
c5696534
...
@@ -18,7 +18,7 @@ NSString *const LFMediaEditingStrings = @"LFMediaEditingController";
...
@@ -18,7 +18,7 @@ NSString *const LFMediaEditingStrings = @"LFMediaEditingController";
static
NSBundle
*
lfMediaEditingBundle
=
nil
;
static
NSBundle
*
lfMediaEditingBundle
=
nil
;
if
(
lfMediaEditingBundle
==
nil
)
{
if
(
lfMediaEditingBundle
==
nil
)
{
// 这里不使用mainBundle是为了适配pod 1.x和0.x
// 这里不使用mainBundle是为了适配pod 1.x和0.x
lfMediaEditingBundle
=
[
NSBundle
bundleWithPath
:[[
NSBundle
bundleForClass
:[
LFBaseEditingController
class
]]
pathForResource
:
@"LFMediaEditingController"
ofType
:
@"bundle"
]];
lfMediaEditingBundle
=
[
NSBundle
bundleWithPath
:[[
NSBundle
bundleForClass
:[
LFBaseEditingController
class
]]
pathForResource
:
@"LFMediaEditingController
.bundle/LFMediaEditingController
"
ofType
:
@"bundle"
]];
}
}
return
lfMediaEditingBundle
;
return
lfMediaEditingBundle
;
}
}
...
...
ios/RNGeekImageEditor.podspec
View file @
c5696534
...
@@ -14,8 +14,8 @@ Pod::Spec.new do |s|
...
@@ -14,8 +14,8 @@ Pod::Spec.new do |s|
s
.
source
=
{
:git
=>
"https://github.com/author/RNGeekImageEditor.git"
,
:tag
=>
"master"
}
s
.
source
=
{
:git
=>
"https://github.com/author/RNGeekImageEditor.git"
,
:tag
=>
"master"
}
s
.
source_files
=
"**/*.{h,m}"
s
.
source_files
=
"**/*.{h,m}"
s
.
resource_bundles
=
{
s
.
resource_bundles
=
{
"YBImageBrowser"
=>
[
'YBImageBrowser/**/*.bundle'
]
,
"YBImageBrowser"
=>
'YBImageBrowser/**/*.bundle'
,
"LFMediaEditingController"
=>
[
'LFMediaEditingController/**/*.bundle'
]
"LFMediaEditingController"
=>
'LFMediaEditingController/**/*.bundle'
}
}
s
.
resource
=
"CheckView/**/*.{png, xib}"
s
.
resource
=
"CheckView/**/*.{png, xib}"
s
.
requires_arc
=
true
s
.
requires_arc
=
true
...
...
ios/RNGeekImageEditor.xcodeproj/project.pbxproj
View file @
c5696534
This diff is collapsed.
Click to expand it.
ios/Utils.h
View file @
c5696534
...
@@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
+
(
NSData
*
)
imageData
:(
UIImage
*
)
image
;
+
(
NSData
*
)
imageData
:(
UIImage
*
)
image
;
+
(
UI
Window
*
)
currentWindow
;
+
(
UI
ViewController
*
)
getCurrentVC
;
+
(
void
)
toVC
:(
UIViewController
*
)
vc
;
+
(
void
)
toVC
:(
UIViewController
*
)
vc
;
...
...
ios/Utils.m
View file @
c5696534
...
@@ -73,13 +73,36 @@
...
@@ -73,13 +73,36 @@
return
data
;
return
data
;
}
}
+
(
UIWindow
*
)
currentWindow
{
//获取当前屏幕显示的viewcontroller
return
[
UIApplication
sharedApplication
].
keyWindow
;
+
(
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
{
+
(
void
)
toVC
:
(
UIViewController
*
)
vc
{
UIWindow
*
window
=
[
Utils
currentWindow
];
UIViewController
*
rootVC
=
[
Utils
getCurrentVC
];
UIViewController
*
rootVC
=
window
.
rootViewController
;
vc
.
modalPresentationStyle
=
UIModalPresentationCustom
;
vc
.
modalPresentationStyle
=
UIModalPresentationCustom
;
[
rootVC
presentViewController
:
vc
animated
:
true
completion
:
nil
];
[
rootVC
presentViewController
:
vc
animated
:
true
completion
:
nil
];
}
}
...
...
ios/YBImageBrowser/Helper/YBIBIconManager.m
View file @
c5696534
...
@@ -74,7 +74,7 @@ NSBundle *YBIBDefaultBundle(void) {
...
@@ -74,7 +74,7 @@ NSBundle *YBIBDefaultBundle(void) {
static
dispatch_once_t
onceToken
;
static
dispatch_once_t
onceToken
;
dispatch_once
(
&
onceToken
,
^
{
dispatch_once
(
&
onceToken
,
^
{
NSBundle
*
_bundle
=
[
NSBundle
bundleForClass
:
NSClassFromString
(
@"YBImageBrowser"
)];
NSBundle
*
_bundle
=
[
NSBundle
bundleForClass
:
NSClassFromString
(
@"YBImageBrowser"
)];
NSString
*
path
=
[
_bundle
pathForResource
:
@"YBImageBrowser"
ofType
:
@"bundle"
];
NSString
*
path
=
[
_bundle
pathForResource
:
@"YBImageBrowser
.bundle/YBImageBrowser
"
ofType
:
@"bundle"
];
bundle
=
[
NSBundle
bundleWithPath
:
path
];
bundle
=
[
NSBundle
bundleWithPath
:
path
];
});
});
return
bundle
;
return
bundle
;
...
...
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