0
我多次使用此代碼,但在我目前的項目中,它不工作。以下是錯誤(第三行):您正在尋找具有UIPanGestureRecognizertranslationInView無法正常工作
- (IBAction)panLayer:(UIGestureRecognizer *)pan{
if (pan.state == UIGestureRecognizerStateChanged) {
CGPoint point = [pan translationInView:self.view];
CGRect frame = self.settingsView.frame;
frame.origin.y = self.layerPosition + point.y;
if (frame.origin.y < 0) {
frame.origin.y = 0;
}
}
謝謝!那是錯誤:) – BalestraPatrick 2013-02-24 07:59:17