Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Image iOS7如何捕获图像并添加标题_Image_Ios7_Camera_Xcode5_Caption - Fatal编程技术网

Image iOS7如何捕获图像并添加标题

Image iOS7如何捕获图像并添加标题,image,ios7,camera,xcode5,caption,Image,Ios7,Camera,Xcode5,Caption,使用Xcode 5和Developing for iOS7,如何捕获图像并添加标题,然后将其存储在应用程序中,以便在应用程序中的单独视图控制器上检索和显示 我知道你设定了这个密码 - (BOOL) startCameraControllerFromViewController: (UIViewController*) controller usingDelegate: (id <UIImagePickerControllerDelegate,

使用Xcode 5和Developing for iOS7,如何捕获图像并添加标题,然后将其存储在应用程序中,以便在应用程序中的单独视图控制器上检索和显示

我知道你设定了这个密码

- (BOOL) startCameraControllerFromViewController: (UIViewController*) controller
           usingDelegate: (id <UIImagePickerControllerDelegate,
                               UINavigationControllerDelegate>) delegate {

    if (([UIImagePickerController isSourceTypeAvailable:
             UIImagePickerControllerSourceTypeCamera] == NO)
        || (delegate == nil)
        || (controller == nil))
        return NO;


    UIImagePickerController *cameraUI = [[UIImagePickerController alloc] init];
    cameraUI.sourceType = UIImagePickerControllerSourceTypeCamera;

    // Displays a control that allows the user to choose picture or
    // movie capture, if both are available:
    cameraUI.mediaTypes =
    [UIImagePickerController availableMediaTypesForSourceType:
        UIImagePickerControllerSourceTypeCamera];

    // Hides the controls for moving & scaling pictures, or for
    // trimming movies. To instead show the controls, use YES.
    cameraUI.allowsEditing = NO;

    cameraUI.delegate = delegate;

    [controller presentModalViewController: cameraUI animated: YES];
    return YES;
}
-(BOOL)startCameraControllerFromViewController:(UIViewController*)控制器
usingDelegate:(id)delegate{
如果(([UIImagePickerController]资源类型可用:
UIImagePickerControllerSourceTypeCamera]==否)
||(委托==零)
||(控制器==零)
返回否;
UIImagePickerController*cameraUI=[[UIImagePickerController alloc]init];
cameraUI.sourceType=UIImagePickerControllerSourceTypeCamera;
//显示允许用户选择图片或图片的控件
//电影捕获,如果两者都可用:
cameraUI.mediaTypes=
[UIImagePickerController可用于源类型的中间类型:
UIImagePickerControllerSourceTypeCamera];
//隐藏用于移动和缩放图片的控件,或用于
//剪辑电影。若要显示控件,请使用“是”。
cameraUI.allowsEditing=否;
cameraUI.delegate=代表;
[控制器显示ModalViewController:cameraUI动画:是];
返回YES;
}

但是我如何将图像保存到另一个视图控制器上检索它,非常感谢您的帮助

若我并没有错的话,并没有内置属性或API用于在图像中添加标题。 首先,您必须使用
UIImagePickerController
捕获图像。在捕获图像后,请使用显示图像的
UIViewcontroller
,并将其放置在
UIExtField
中以添加标题,然后保存

或者您可以使用UIImagePickerController的Overlay属性,您可以尝试使用它