English 中文(简体)
表演者
原标题:performSegueWithIdentifier gives me NSInvalidArgumentException
  • 时间:2012-04-17 07:14:59
  •  标签:
  • ios
  • segue

我试图用一个中心塔顿做一个简单的塔巴信,以便了解情况,增加评论并上载(如数十个其他信)。

So far, I got the camera stuff working in a custom view controller (MSPickPhotoViewController) as one of my tab bar items and now I want to hand it over to NavigationController allowing to enter some information and to upload the photo to a server. I m using a storyboard and tried using a segue from my MSPickPhotoViewController to the navigation controller. I gave the segue an identifier addPhoto which i call by:

[self performSegueWithIdentifier:@"addPhoto" sender:self];

在MSPickPhotoViewController,我还做了以下工作:交出在座的照片:

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    if ([[segue identifier] isEqualToString:@"addPhoto"]) {
        MSPostPhotoViewController *vc = [segue destinationViewController];  
        vc.image.image = self.image;
    }
}

I m总能例外

 NSInvalidArgumentException , reason:  Receiver (<MSPickPhotoViewController: 0x189770>) has no segue with identifier  addPhoto  

MSPickPhotoViewController本人没有纽伦,它只是开一份行动表,选择是否从图书馆取光或选取照片,并交出照片。

任何建议?

Greetings, Björn

最佳回答

Ok:

  1. It s always good to delete the app on the iphone Before running again. The storyboard was never refreshed.
  2. Finally the segue performed (as i could see by the log), but i forgot to hide rhe modal UiImagePickerController and didn t see the next view.

仍然学习......

问题回答

暂无回答




相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签