我正在尝试将使用GET
的{{1}}请求收到的词典传递给AFNetworking
。但是我收到了这个错误。
class method parameter
这是我检索数据并传递数据的方式。
+[SASwipeButtonSettings performActionForLeftSwipeWithVideo:]: unrecognized selector sent to class 0x3a42a8
2015-06-29 15:03:38.526 StreamacyBeta[3712:1057453] *** Terminating app due to uncaught exception 'NSInvalidArgumentException'
我有这个问题的任何想法?我方法上的参数只接受AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
[manager GET:youtubeApi parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) {
self.videos = responseObject[@"items"];
[self.tableView reloadData];
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"Error: %@", error);
}];
-(BOOL)swipeTableCell:(MGSwipeTableCell *)cell tappedButtonAtIndex:(NSInteger)index direction:(MGSwipeDirection)direction fromExpansion:(BOOL)fromExpansion
{
NSIndexPath *indexPath = [self.tableView indexPathForCell:(UITableViewCell *)cell];
NSDictionary *selectedVideo = self.videos[indexPath.row];
if (direction == MGSwipeDirectionLeftToRight) {
[SASwipeButtonSettings performActionForLeftSwipeWithVideo:selectedVideo];
}
return YES;
}
。
答案 0 :(得分:1)
您的班级SASwipeButtonSettings
似乎没有实现采用performActionForLeftSwipeWithVideo
的静态方法NSDictionary*
。它似乎不是AFNetworking问题。