mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 09:35:48 +00:00
90aad9a610
Summary: This PR adds support for UIImagePickerController to allow selecting a photo / video from the users camera roll. ![ios simulator screen shot jun 14 2015 4 50 03 pm](https://cloud.githubusercontent.com/assets/688326/8147758/ae6dc8d4-12b6-11e5-80f0-2bcaa964a5d8.png) Example: Selecting something from camera roll ``` ImagePickerIOS.openSelectDialog(<config>, <successCallback>, <cancelCallback>); ImagePickerIOS.openSelectDialog({ showImages: true, // defaults to true showVideos: false // defaults to false }, function (data) { console.info("Got a callback!"); console.info(data); // file URL as in assets-library://asset/asset.JPG?id=E2741A73-D185-44B6-A2E6-2D55F69CD088&ext=JPG }, function() { console.info("Cancelled"); }); ``` Using camera ``` ImagePickerIOS.openCameraDialog(<config>, <successCallback>, <cancelCallback>); ImagePickerIOS.openSelectDialog({ videoMode: false, // defaults to true, whether to record videos instead }, function (data) { console.info("Got Closes https://github.com/facebook/react-native/pull/1620 Github Author: David Mohl <me@dave.cx> Test Plan: Imported from GitHub, without a `Test Plan:` line.
16 lines
406 B
Objective-C
16 lines
406 B
Objective-C
/*
|
|
* Copyright (c) 2013, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*
|
|
*/
|
|
|
|
#import "RCTBridgeModule.h"
|
|
|
|
@interface RCTImagePickerManager : NSObject <RCTBridgeModule>
|
|
|
|
@end
|