i think i found the solution. The commented UIview animation block locked the main thread i think that is why Scroll View couldnt response to the new touches. but with this new animation block it works well.
- (void) scrollViewDidScroll:(UIScrollView *)scrollView
{
if (self.lastContentOffset > scrollView.contentOffset.y)
{
if (self.altView.frame.size.height + self.altView.frame.origin.y > self.screenHeight)
{
// [UIView animateWithDuration:0.5f animations:^{
// self.altView.frame = CGRectMake(0, self.altView.frame.origin.y-1, 320, 48);
// self.tarayici.frame = CGRectMake(0, self.tarayici.frame.origin.y, 320, self.tarayici.frame.size.height-1);
// }];
\[UIView animateWithDuration:0.5f delay:0 options:UIViewAnimationOptionAllowUserInteraction animations:^{
self.altView.frame = CGRectMake(0, self.altView.frame.origin.y-1, 320, 48);
self.tarayici.frame = CGRectMake(0, self.tarayici.frame.origin.y, 320, self.tarayici.frame.size.height-1);
} completion:^(BOOL finished) {
}\];
}
}
else if (self.lastContentOffset < scrollView.contentOffset.y)
{
if (self.altView.frame.origin.y < self.screenHeight)
{
// [UIView animateWithDuration:0.5f animations:^{
// self.altView.frame = CGRectMake(0, self.altView.frame.origin.y + 1, 320, 48);
// self.tarayici.frame = CGRectMake(0, self.tarayici.frame.origin.y, 320, self.tarayici.frame.size.height+1);
// }];
[UIView animateWithDuration:0.5f delay:0 options:UIViewAnimationOptionAllowUserInteraction animations:^{
self.altView.frame = CGRectMake(0, self.altView.frame.origin.y + 1, 320, 48);
self.tarayici.frame = CGRectMake(0, self.tarayici.frame.origin.y, 320, self.tarayici.frame.size.height+1);
} completion:^(BOOL finished) {
}\];
}
}
self.lastContentOffset = scrollView.contentOffset.y;
}
vemedya.com