an interesting issue: i have created my own delete button for my table view. the delete button animates just like in the Clock app (the minus turns 90º counterclockwise). the animating delete button is also set to show touch on highlight.
the interesting part: if the table view's scrolling is active, pressing the delete button will animate the button at the same time as the scrolling, but the highlight will not fade out until the scrolling has stopped.
i've tried the following code (in red) but it doesn't seem to work. i'm trying to stop the scrolling in it's current position. my rows are non selectable so it maybe why this doesn't work.
any ideas?
[EDIT] i just tried changing the UITableViews deceleration rate with the aim to return the deceleration rate to normal after the animation, assuming it would quickly slow when my delete button was pressed, but the results were not as expected. it slowed down, but took just as long to fully stop (i assume this is normal when switching from the normal rate to the fast rate while scrolling). as far as i can see right now the only way around this is to always set the deceleration rate to:
even though i don't want to do that, or create my own animating highlight for the button.
this feels like a bug to me. thoughts?
the interesting part: if the table view's scrolling is active, pressing the delete button will animate the button at the same time as the scrolling, but the highlight will not fade out until the scrolling has stopped.
i've tried the following code (in red) but it doesn't seem to work. i'm trying to stop the scrolling in it's current position. my rows are non selectable so it maybe why this doesn't work.
Code:
- (void)activateDelete
{
[COLOR="red"][measurementsTableView scrollToNearestSelectedRowAtScrollPosition:UITableViewScrollPositionNone animated:YES];[/COLOR]
[UIView beginAnimations:@"activateDelete" context:NULL];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationDuration:kAnimationShowHideInfoAndDelete];
addDeleteButtonOff.alpha = 0.0;
deleteButtonOn.alpha = 1.0;
CGAffineTransform transform = CGAffineTransformMakeRotation(M_PI * -0.5);
deleteButton.transform = transform;
[UIView commitAnimations];
}
any ideas?
[EDIT] i just tried changing the UITableViews deceleration rate with the aim to return the deceleration rate to normal after the animation, assuming it would quickly slow when my delete button was pressed, but the results were not as expected. it slowed down, but took just as long to fully stop (i assume this is normal when switching from the normal rate to the fast rate while scrolling). as far as i can see right now the only way around this is to always set the deceleration rate to:
Code:
[measurementsTableView setDecelerationRate:UIScrollViewDecelerationRateFast];
even though i don't want to do that, or create my own animating highlight for the button.
this feels like a bug to me. thoughts?