Handling item selection in TKSideDrawer
is as simple as adopting TKSideDrawerDelegate
and implementing its sideDrawer:didSelectItemAtIndexPath:
method. Use the passed NSIndexPath
to determine which item was selected and take the appropriate action:
- (void)sideDrawer:(TKSideDrawer *)sideDrawer didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
NSLog(@"Selected item in section: %d at index: %d", (int)indexPath.section, (int)indexPath.row);
}
func sideDrawer(_ sideDrawer: TKSideDrawer!, didSelectItemAt indexPath: IndexPath!) {
NSLog("Selected item in section: %ld at index: %ld ", indexPath.section, indexPath.row)
}
public override void DidSelectItem (TKSideDrawer sideDrawer, NSIndexPath indexPath)
{
Console.WriteLine ("Selected item in section: {0} at index: {1}", indexPath.Section, indexPath.Row);
}