Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/43.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 删除其他框架后获取无法识别的选择器_Iphone_Objective C_Ios_Uitableview - Fatal编程技术网

Iphone 删除其他框架后获取无法识别的选择器

Iphone 删除其他框架后获取无法识别的选择器,iphone,objective-c,ios,uitableview,Iphone,Objective C,Ios,Uitableview,编辑:我在这里找到了解决方案 我有一个UITableView,它利用了SDWebImage,效果很好,但我决定从我的应用程序中删除ShareKit。我所做的只是删除ShareKit,删除对它的任何引用,然后重新安装ObjectiveFlickr、JSONKit和LFWebAPIkit。我在这张桌子上没有用到这些。在我这样做之后,一切都正常,除了这个tableview 我得到这个错误: -[UIImageView setImageWithURL:placeholderImage:]: unreco

编辑:我在这里找到了解决方案

我有一个UITableView,它利用了SDWebImage,效果很好,但我决定从我的应用程序中删除ShareKit。我所做的只是删除ShareKit,删除对它的任何引用,然后重新安装ObjectiveFlickr、JSONKit和LFWebAPIkit。我在这张桌子上没有用到这些。在我这样做之后,一切都正常,除了这个tableview

我得到这个错误:

-[UIImageView setImageWithURL:placeholderImage:]: unrecognized selector sent to instance 0x86b31a0
我在编译和使用autocomplete方面没有问题,我甚至删除和读取了SDWebImage,但它没有任何作用。一切运行正常,但当它尝试加载带有UIImageView的表时,会立即在此行崩溃:

[cell.imageView setImageWithURL:[v thumbURL] placeholderImage:[UIImage imageNamed:@"46-movie-2.png"]];
这是我的密码:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"YTVVideoTableCell";

YTVVideoTableCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

if (cell == nil) {
    cell = [[YTVVideoTableCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}

Video *v = [[[VideoStore sharedStore] allItems] objectAtIndex:[indexPath row]];;

[cell.imageView setImageWithURL:[v thumbURL] placeholderImage:[UIImage imageNamed:@"46-movie-2.png"]];

[cell setController:self];
[cell setTableView:[self tableView]];

[[cell titleLabel] setText:[v title]];
[[cell titleLabel] alignBottom];

return cell;
}


当我删除ShareKit时,你知道哪里出了问题吗?有没有解决问题的方法?

检查您是否已将SDWebImage标头导入到类中。

我在这里找到了答案:


我将“-force_load${build_PRODUCTS_DIR}/libSDWebImageARC.a”添加到我的构建设置“其他链接器标志”中,现在可以使用了。

这将解决问题:打开“构建设置”选项卡,在“链接”部分,找到“其他链接器标志”设置并添加“-ObjC”标志:

我通过Cocoapods使用
SDWebImage
时出现此错误。原来,
SDWebImage
pod列在pod文件中不正确的目标下。将它移到文件的顶部对我来说很有效。

可能是重复的