implement sharing in iOS, add OpenGL renderer in OSX window
This commit is contained in:
@@ -70,6 +70,21 @@ std::recursive_mutex lock_mutex;
|
||||
[self.context presentRenderbuffer:GL_RENDERBUFFER];
|
||||
}
|
||||
|
||||
- (void)share_file:(NSString *)file_path
|
||||
{
|
||||
NSURL *url = [NSURL fileURLWithPath:file_path];
|
||||
NSArray *objectsToShare = @[url];
|
||||
|
||||
UIActivityViewController *controller = [[UIActivityViewController alloc] initWithActivityItems:objectsToShare applicationActivities:nil];
|
||||
|
||||
controller.excludedActivityTypes = @[];
|
||||
controller.popoverPresentationController.sourceView = self.view;
|
||||
controller.popoverPresentationController.sourceRect = CGRectMake(self.view.bounds.size.width/2, self.view.bounds.size.height/4, 0, 0);
|
||||
|
||||
// Present the controller
|
||||
[self presentViewController:controller animated:YES completion:nil];
|
||||
}
|
||||
|
||||
-(void)display_file:(std::string)filename
|
||||
{
|
||||
NSString* filePath = [NSString stringWithUTF8String:filename.c_str()];
|
||||
|
||||
Reference in New Issue
Block a user