Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShareExtend
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
李增强
ShareExtend
Commits
3ff1d841
Commit
3ff1d841
authored
Jun 10, 2020
by
zhouteng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set default share panel position
parent
23c89244
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
ios/Classes/ShareExtendPlugin.m
ios/Classes/ShareExtendPlugin.m
+7
-4
No files found.
ios/Classes/ShareExtendPlugin.m
View file @
3ff1d841
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
NSNumber
*
originWidth
=
arguments
[
@"originWidth"
];
NSNumber
*
originWidth
=
arguments
[
@"originWidth"
];
NSNumber
*
originHeight
=
arguments
[
@"originHeight"
];
NSNumber
*
originHeight
=
arguments
[
@"originHeight"
];
CGRect
originRect
;
CGRect
originRect
=
CGRectZero
;
if
(
originX
!=
nil
&&
originY
!=
nil
&&
originWidth
!=
nil
&&
originHeight
!=
nil
)
{
if
(
originX
!=
nil
&&
originY
!=
nil
&&
originWidth
!=
nil
&&
originHeight
!=
nil
)
{
originRect
=
CGRectMake
([
originX
doubleValue
],
[
originY
doubleValue
],
originRect
=
CGRectMake
([
originX
doubleValue
],
[
originY
doubleValue
],
[
originWidth
doubleValue
],
[
originHeight
doubleValue
]);
[
originWidth
doubleValue
],
[
originHeight
doubleValue
]);
...
@@ -60,12 +60,15 @@
...
@@ -60,12 +60,15 @@
UIActivityViewController
*
activityViewController
=
[[
UIActivityViewController
alloc
]
initWithActivityItems
:
sharedItems
applicationActivities
:
nil
];
UIActivityViewController
*
activityViewController
=
[[
UIActivityViewController
alloc
]
initWithActivityItems
:
sharedItems
applicationActivities
:
nil
];
UIViewController
*
controller
=
[
UIApplication
sharedApplication
].
keyWindow
.
rootViewController
;
UIViewController
*
controller
=
[
UIApplication
sharedApplication
].
keyWindow
.
rootViewController
;
activityViewController
.
popoverPresentationController
.
sourceView
=
controller
.
view
;
activityViewController
.
popoverPresentationController
.
sourceView
=
controller
.
view
;
if
(
!
CGRectIsEmpty
(
origin
))
{
activityViewController
.
popoverPresentationController
.
sourceRect
=
origin
;
if
(
CGRectIsEmpty
(
origin
))
{
origin
=
CGRectMake
(
0
,
0
,
controller
.
view
.
bounds
.
size
.
width
,
controller
.
view
.
bounds
.
size
.
width
/
2
);
}
}
activityViewController
.
popoverPresentationController
.
sourceRect
=
origin
;
[
activityViewController
setValue
:
subject
forKey
:
@"subject"
];
[
activityViewController
setValue
:
subject
forKey
:
@"subject"
];
[
controller
presentViewController
:
activityViewController
animated
:
YES
completion
:
nil
];
[
controller
presentViewController
:
activityViewController
animated
:
YES
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