Handling Rotation and Touch Gestures in Table Selection Area

Operating system requirements: iOS 5.0 or later.

Mobile device: iPad.

Description

This example implements handling of table selection area touch gesture and table rotation gesture.

Source Code

Executing the example requires to place the following code instead of the executeExample method of the ViewController class (see the Creating a Simple Data Grid section):

-(void) executeExample {
    // Enable table area selection
    [contr setCanSelect:YES];
};
// Handle selection area touch event
- (void)selectionAreaTouched:(NuGridSelectionArea *)selectionArea{
    NSLog(@"%@", @"Selection area touched");
}
// Handle table rotation gesture
- (void)transposeGestureRecognizedInGridView:(NuGridView *)gridView{
    NSLog(@"%@", @"Table rotation gesture executed");
}

Touch any table cell by selecting it, after that touch the selected area. Rotate the table by rotation gesture.

As a result, the development console displays messages about calling of handled events:

Selection area touched

Table rotation gesture executed

See also:

Examples of Component Use