0
我真的很抱歉如果這是一個愚蠢的問題。 我想創建一個使用第三方庫infiniteTabController的應用程序,但由於我編譯的示例/演示代碼,它工作完美,但是當我將它導入到我自己的項目庫文件給出錯誤nameNo選擇器的已知實例方法'previousLocationInView: '第三方庫導入錯誤Xcode沒有已知的選擇器實例方法
代碼在這裏。
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesMoved:touches withEvent:event];
if (self.state == UIGestureRecognizerStateFailed) return;
CGPoint nowPoint = [[touches anyObject] locationInView:self.view];
CGPoint prevPoint = [[touches anyObject]previousLocationInView:self.view];
_moveX += prevPoint.x - nowPoint.x;
_moveY += prevPoint.y - nowPoint.y;
if (!_drag) {
if (abs(_moveX) > kM13PanDirectionThreshold) {
if (_panDirection == M13PanGestureRecognizerDirectionVertical) {
self.state = UIGestureRecognizerStateFailed;
}else {
_drag = YES;
}
}else if (abs(_moveY) > kM13PanDirectionThreshold && _moveY > _moveX) {
if (_panDirection == M13PanGestureRecognizerDirectionHorizontal) {
self.state = UIGestureRecognizerStateFailed;
}else {
_drag = YES;
}
}
}
此行提示錯誤。
CGPoint prevPoint = [[touches anyObject]previousLocationInView:self.view];
第三方庫名稱是M13InfiniteTabController