Note that there are some explanatory texts on larger screens.

plurals
  1. POTrying to get a view controller to appear after a method has been declared
    primarykey
    data
    text
    <p>Here is my code, I don't know what's wrong with it. I am concern about the ImagePickerController method. Is something wrong with it? I declared the property for image view , I just want the ViewController to transition to my EditViewController , but after I have selected the image, it gets me back to ViewController instead of edit view controller. ViewController.h :</p> <pre><code>#import &lt;UIKit/UIKit.h&gt; #import &lt;iAd/iAd.h&gt; @interface ViewController : UIViewController &lt;UIImagePickerControllerDelegate , UINavigationControllerDelegate ,ADBannerViewDelegate&gt; -(IBAction)GoToEdit:(id)sender; @property (weak, nonatomic) IBOutlet UIImageView *imageView; @property (strong,nonatomic) UIImage *chosenImage; @property (strong,nonatomic) UIImagePickerController *imagePicker; @end </code></pre> <p>ViewController.m</p> <pre><code>- (IBAction)chooseImage:(id)sender { self.imagePicker = [[UIImagePickerController alloc] init]; self.imagePicker.delegate = self; [self.imagePicker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary]; [self presentViewController:self.imagePicker animated:YES completion:nil]; } -(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo: (NSDictionary *)info{ self.chosenImage = info[UIImagePickerControllerOriginalImage]; [self.imageView setImage:self.chosenImage]; [self dismissViewControllerAnimated:YES completion:nil]; EditViewController *editViewController = [[EditViewController alloc]init]; editViewController.chosenImage = self.chosenImage; [self.navigationController pushViewController:editViewController animated:YES]; } </code></pre> <p>EditViewController.h (Declaring Property for ImageView)</p> <pre><code>#import &lt;UIKit/UIKit.h&gt; @interface EditViewController : UIViewController @property (strong,nonatomic) UIImage *chosenImage; @end </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    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. 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