Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
react-native-amap3d
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
放牛的园子
react-native-amap3d
Commits
51909226
Commit
51909226
authored
Dec 01, 2017
by
7c00
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update iOS ReactSubview manager
parent
9688deed
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
AMapView.m
ios/maps/AMapView.m
+2
-7
No files found.
ios/maps/AMapView.m
View file @
51909226
...
...
@@ -41,8 +41,7 @@
}
}
-
(
void
)
insertReactSubview
:
(
id
<
RCTComponent
>
)
subview
atIndex
:
(
NSInteger
)
atIndex
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
-
(
void
)
didAddSubview
:
(
UIView
*
)
subview
{
if
([
subview
isKindOfClass
:[
AMapMarker
class
]])
{
((
AMapMarker
*
)
subview
).
mapView
=
self
;
[
self
addAnnotation
:(
id
<
MAAnnotation
>
)
subview
];
...
...
@@ -50,20 +49,16 @@
if
([
subview
isKindOfClass
:[
AMapModel
class
]])
{
[
self
addOverlay
:(
id
<
MAOverlay
>
)
subview
];
}
[
super
insertReactSubview
:
subview
atIndex
:
atIndex
];
});
}
-
(
void
)
removeReactSubview
:
(
id
<
RCTComponent
>
)
subview
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
super
removeReactSubview
:
subview
];
if
([
subview
isKindOfClass
:[
AMapMarker
class
]])
{
[
self
removeAnnotation
:(
id
<
MAAnnotation
>
)
subview
];
}
if
([
subview
isKindOfClass
:[
AMapModel
class
]])
{
[
self
removeOverlay
:(
id
<
MAOverlay
>
)
subview
];
}
[
super
removeReactSubview
:
subview
];
});
}
@end
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