Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well for this kind of method, you would have to create a <strong>singleton class</strong> like <code>ShareClass.h</code> or if you are really new (and dont know about this) , in the <code>AppDelegate.h</code> wherein you would have to declare a <code>UIImage</code> say <code>UIImage *SavedImage</code>. </p> <p>Now call this class in the view where you are capturing the image . Then save this captured image in the <code>SavedImage</code>. To share this image you would then call the <code>ShareClass.h</code> class or the <code>AppDelegate.h</code> in the view in which you want to share the image and display it in the <code>UIImageView</code>.</p> <p>Any clarifications please ask. :)</p> <p>In the <code>ShareClass.h</code></p> <pre><code>UIImage *SavedImage; @interface ShareClass : NSObject { } </code></pre> <p>In the Class where the image was captured, First import the <code>ShareClass.h</code>, then</p> <pre><code> imagepicker.sourceType = UIImagePickerControllerSourceTypeCamera; if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { imagepicker.sourceType = UIImagePickerControllerSourceTypeCamera; SavedImage = UIImagePickerControllerSourceTypeCamera; [self presentViewController:imagepicker animated:YES completion:NULL]; } </code></pre> <p>In the Class where the image should be displayed again import the <code>ShareClass.h</code></p> <pre><code>UIImageView *DisplayImage = [[UIImageView alloc]initWithImage:[UIImage imageNamed:SavedImage]]; DisplayImage.frame=CGRectMake(0, 0, 20, 20); [self.view addSubView:DisplayImage]; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload