On my iphone app, I have a UITableView in edit mode, containing custom UITableViewCell. I would like to detect when user has clicked on the left button of each cell (minus c
You can subclass UITableViewCell
that implements -willTransitionToState:
and/or -didTransitionToState:
methods.
willTransitionToState: Subclasses of UITableViewCell can implement this method to animate additional changes to a cell when it is changing state. UITableViewCell calls this method whenever a cell transitions between states, such as from a normal state (the default) to editing mode. The custom cell can set up and position any new views that appear with the new state. The cell then receives a layoutSubviews message (UIView) in which it can position these new views in their final locations for the new state. Subclasses must always call super when overriding this method.
- (void)setEditing:(BOOL)editing animated:(BOOL)animate
{
[super setEditing:editing animated:animate];
if(editing)
{
NSLog(@"editMode on");
}
else
{
NSLog(@"editMode off");
}
}