Created
March 26, 2015 22:39
-
-
Save madjam002/5f0dd570f8b20ce9e124 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "RCTViewManager.h" | |
#import "MapboxGL.h" | |
@interface MapBoxViewManager : RCTViewManager | |
@end | |
@implementation MapBoxViewManager | |
- (UIView *)view | |
{ | |
MGLMapView *mapView = [[MGLMapView alloc] initWithFrame:CGRectMake(0, 0, 400, 400) | |
accessToken:@"token"]; | |
return mapView; | |
} | |
@end |
Thread 1, so I think it's something to do with Mapbox internally creating threads for rendering the map, but surely that shouldn't conflict with react-native? I thought that as long as initWithFrame
is called on the main thread, all should be fine.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah, - (UIView *)view should definitely always be called on the main thread. Are you certain that it isn't being? If you put a breakpoint in that method, what thread is it being hit on?