Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>maybe I don't understand what you are trying to do UI wise, but why would this not work from your code provide:</p> <p>EDIT: (changed code to use a delegate)</p> <pre><code>- (void)imagePickerController:(UIImagePickerController *)imagepicker didFinishPickingMediaWithInfo:(NSDictionary *)info { // Access the uncropped image from info dictionary UIImage *image = [info objectForKey:@"UIImagePickerControllerOriginalImage"]; if([delegate respondsToSelector:@selector(didSelectImage:)]) [delegate didSelectImage:image]; } </code></pre> <p>this goes in your header file (usually above your class declaration):</p> <pre><code>@protocol PostHelperDelegate &lt;NSObject&gt; @optional - (void)DimissModal; //image data for image selected - (void)DidSelectImage:(UIImage*)image; @end </code></pre> <p>also you need to create this property in your class</p> <pre><code>@property(nonatomic,assign)id&lt;PostHelperDelegate&gt;* delegate; //don't forgot to synthizie </code></pre> <p>then in the class implementing the delegate you will assign the delegate your class:</p> <pre><code> Poster = [[delegateclass alloc] init]; Poster.delegate = self; </code></pre> <p>then just add the delegate function:</p> <pre><code> - (void)DidSelectImage:(UIImage*)image { //handle image here } </code></pre> <p>I simplify this quite a bit, let me know if you have any trouble getting it working</p> <p><a href="http://www.roostersoftstudios.com/2011/04/12/simple-delegate-tutorial-for-ios-development/" rel="nofollow">http://www.roostersoftstudios.com/2011/04/12/simple-delegate-tutorial-for-ios-development/</a></p> <p>BEFORE UPDATE:</p> <p>personally I would use a delegate to notify that the image has been picked and than launch the mail picker, but that is another thing. As far as the UIImage, I don't know a way or have never found a way to name/or get a name from the UIImagePicker as I do not believe they are named anything meaningful. Any questions on the delegate or further explanation let me know. </p>
    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.
 

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