我一直在搞這個天。我是新的xcode ..但只是不知道爲什麼我一直得到這個錯誤。我已經嘗試過,並試圖......我希望有人能幫助我。感謝您的時間'ImageEditorViewController'沒有明顯的@interface聲明選擇器'initWithImageAndSaveName:saveName:'
- (void)longPressAction:(UILongPressGestureRecognizer *)gestureRecognizer
{
CGPoint touchLocation = [gestureRecognizer locationInView:self.webView];
NSString *javascript = [NSString stringWithFormat:@"document.elementFromPoint(%f, %f).src", touchLocation.x, touchLocation.y];
NSString *imageUrl = [self.webView stringByEvaluatingJavaScriptFromString:javascript];
NSData *imageData = [NSData dataWithContentsOfURL:[NSURL URLWithString:imageUrl]];
UIImage *image = [UIImage imageWithData:imageData];
// Show the editor
ImageEditorViewController *editView = [[ImageEditorViewController alloc] initWithImageAndSaveName:image saveName:[imageUrl lastPathComponent]];
[self.navigationController pushViewController:editView animated:YES];
}
你在哪裏申報和實施這些方法?做cmd-shift-f來搜索整個項目。 – 2013-03-22 05:39:13